This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Load dll in VC
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin <cygwin at cygwin dot com>
- Date: Fri, 23 Jun 2006 01:11:25 -0700
- Subject: Re: Load dll in VC
- References: <000501c69686$6e315a30$ab01a8c0@loiscxf>
- Reply-to: cygwin at cygwin dot com
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/