Hi all,

I'm newbie to Cryptopp but not to cryptography in general. I'm using
cryptopp.dll v5.2.3 with VC2003, and I'm building my own (non-MFC) dll
that is supposed to use cryptopp.dll. Main settings are /MTd and /D
"CRYPTOPP_DLL_ONLY". It seems that none of the three options in the
"DLL Memory Management" section of readme.txt is working for me. All
three cases fail in the call to DoDllPowerUpSelfTest from DllMain:

1. If I use GetNewAndDeleteForCryptoPP then first called "new" causes
stack overflow because CRT is not loaded yet (trying to create heap
critical section ad infinitum). Bad idea to use CRT in DllMain
anyway...

2. If I use SetNewAndDeleteFromCryptoPP then first test fails when
CryptAcquireContext is called from MicrosoftCryptoProvider
constructor.

3. If I don't use anything then "new" from msvcrt.dll is used
(accidentally found in advapi32.dll), but first call to it fails.

In all three cases execution ends up in catch(...) in
DoDllPowerUpSelfTest (thanks to VC treat-OS-exceptions-as-CPP-
exceptions "feature") and the function fails.

So, what am I doing wrong? If I use option 2 and call
DoDllPowerUpSelfTest on my own then it seems to work, but this looks
to me as a workaround. Is there a proper solution?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to