> From: owner-openssl-us...@openssl.org On Behalf Of Charles Mills > Sent: Friday, 26 October, 2012 11:08
> 1. Pardon my ignorance. So _Applink is a generic Windows facility, not > OpenSSL-specific? Can you point me to a link or something > that explains. I could not find anything. OpenSSL_Applink is OpenSSL specific as the name indicates, not to mention that the file applink.c is part of the OpenSSL distro and install. GetModuleHandle() and GetProcAddress() are Windows generic; look at the code in ms/uplink.c. > > 2. While searching, I did find this: > http://msdn.microsoft.com/en-us/library/windows/desktop/ms6825 > 86(v=vs.85).as > px It's a definitive explanation of a topic that was > discussed here recently > (this thread?): "how does Windows determine which copy of a > DLL to use?" One > thing of note: it is decidedly NOT true that "if you put the > DLL in the same > folder as the EXE that is the one that will always get used." > Ridiculously > complex, but a definitive explanation, FWIW. > > Charles > > -----Original Message----- > From: owner-openssl-us...@openssl.org > [mailto:owner-openssl-us...@openssl.org] On Behalf Of Dave Thompson > Sent: Thursday, October 25, 2012 2:00 PM > To: openssl-users@openssl.org > Subject: RE: Trouble with Windows DLL > > > From: owner-openssl-us...@openssl.org On Behalf Of Charles Mills > > Sent: Wednesday, 24 October, 2012 19:08 > > > > The code for "uplink" looks to me like it looks for > > _Applink ONLY in the .exe > > > > It *HAS* to be a .exe? OpenSSL has logic that depends on > what type of > > executable is calling it? If I had a .exe that worked with > OpenSSL I could > > not necessarily turn it into a .DLL that exported services > to calling > > programs? > > > No, OpenSSL on Windows does not have logic that depends on > the caller, > that's why this DOESN'T work. The simplest "upward" dynamic lookup in > Windows looks only in the .exe. In order to look in the .dll, OpenSSL > would need more complicated code to figure out is that was > called from > a .dll and not the .exe, and WHICH particular .dll because you could > have multiple .dll's compiled differently, and lookup there. > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org