Compiling errors with '-mno-cygin' option on Cygwin

Demmer, Thomas TDemmer@krafteurope.com
Fri Oct 24 06:28:00 GMT 2003


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@krafteurope.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/



More information about the Cygwin mailing list