Load dll in VC

Brian Dessent brian@dessent.net
Fri Jun 23 13:00:00 GMT 2006


cxf wrote:

>     I have a standard dll file CYGCRYPTO-0.9.8.DLL. Using the VC tool
> "depends",I can see that this dll file depends on cygwin1.dll.when I
> load the file CYGCRYPTO-0.9.8.DLL in VC,the program is stoped,I don't
> know why.I do the following in VC:
>     LoadLibrary("CYGCRYPTO-0.9.8.DLL");
>     (cygwin1.dll is under the directory where cygcrypto-0.9.8 resides
> in.)

You really should use a mingw-compiled openssl instead.  Trying to
dynamically load cygwin1.dll is not straightforward.  (Even though you
are loading cygcrypto.dll this will cause cygwin1.dll to load so you
have to follow the same procedure.)  You'll need to ensure that there is
scratch space at the bottom of the stack, and you'll have to initialize
the DLL with cygwin_dll_init() once loaded.  See the "cygload" source
and the FAQ.

Brian

--
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