This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Load dll in VC


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]