Re: CryptAquireContext

From: Oliver Young (none)
Date: 12/17/03


Date: Wed, 17 Dec 2003 09:34:52 +0100


    It happens a lot of times that CryptAcquireContext fails on WinXP with
IE6 SP1 installed, but guys from MS won't accept that as a bug.

Solution: After you receive NTE_BAD_KEYSET for the first call to
CryptAcquireContext, try calling CryptAcquireContext using
CRYPT_DELETEKEYSET (to delete the unusable key set if it actually exists),
and then call CryptAcquireContext using CRYPT_NEWKEYSET.


Quantcast