Hi Friends,
I am facing issue using SafeHandleZeroOrMinusOneIsInvalid when using
from C# code to call C++ code using pInvoke to use CryptoPP
functionality. I am getting AccessViolation exception on Window 7 64
bit machine. It works fine on Windows XP.
I have derived my class CryptoHandle from the above class and used as
the return type (pointer to C++ class). The class is a CryptoU class
with methods to use CryptoPP methods.
When I am passing the CryptoHandle instance to a pInvoke method to
call destructor on the C++ class, it calls delete on the instance and
it deletes below class variables...
if(m_pServerPubKey != NULL)
{
delete m_pServerPubKey;
m_pServerPubKey = NULL;
}
if(m_pPrivKey != NULL)
{
delete m_pPrivKey;
m_pPrivKey = NULL;
}
RSAES_PKCS1v15_Encryptor* m_pServerPubKey and
RSAES_PKCS1v15_Decryptor* m_pPrivKey
I am getting exception when below line gets executed
delete m_pServerPubKey;
Do you think I am using SafeHandle wrong way or do u think the issue
might be in the way I delete CryptoPP?
Let me know if you need more info on the same.
Appreciate your time and help.
Thanks,
Jit
--
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.