I've been playing around with CryptoAPI
and everything was fine.
I've imported .PFX
to the certificate store, got context, got CSP
handle. Every function I've been using I've checked for the mistakes with GetLastError
function. But when I'd called CryptGetUserKey
with three arguments which are hCryptProv
, dwKeySpec
and pointer to UserKey
, I got an error, but GetLastError
call didn't show me anything but a random value like 2148073485
that means nothing I suppose.
How can I find out what is wrong?
OS - Windows 7 32b HP;
Programming language - C++;
IDE - MSVS2013 Ultimate.