delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/24/01:53:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <8D861ADC5B8FD211B4100008C71EA7DA04F7125A@kjsdemucshrexc1.eu.pm.com>
From: "Demmer, Thomas" <TDemmer AT krafteurope DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Cc: "'bezzam AT astro DOT ocis DOT temple DOT edu'" <bezzam AT astro DOT ocis DOT temple DOT edu>
Subject: Re: Compiling errors with '-mno-cygin' option on Cygwin
Date: Fri, 24 Oct 2003 07:53:09 +0200
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h9O5rKRO015640

Paul,
I have no idea how to do that in VB, but in Delphi the following works:
If you build a DLL with -mno-cygwin, you can say

function  StartIntegration(inifile: PChar;param :Pointer): integer;cdecl;
extern
                 'crm.dll' name 'StartIntegration';

in Delphi.

If you build a Cygwin-DLL, you have to do the following:

Var
 StartIntegration: Function(inifile: PChar;param :Pointer): integer;cdecl; 

initialization
  h := LoadLibrary('crm.dll');
  StartIntegration := GetProcAddress('StartIntegration');
end;

The first is very similar to linking against an Importlibrary, while the
second is something magical to me. It works for me, but I usually have 
an rxvt, inetd, or other cygwin process running. In this way you can even
mix DLLs depending on cydwin1.dll and mscrt.dll, althaoug this is not really
efficient.

Ciao
Tom


Best regards / Mit freundlichen Grüssen,

Thomas Demmer
Kraft Foods R&D Inc.
Tel.: +49 (0)89 62738-6302
Fax: +49 (0)89 62738-86302
mailto:tdemmer AT krafteurope DOT com <mailto:> 

Thought of the day
Man is the best computer we can put aboard a spacecraft ... and the
only one that can be mass produced with unskilled labor.
                -- Wernher von Braun




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019