For the actual question, please see below the [ code ] section, but first some background:
The CPImportKey function is listed in Visual Studio 2005's MSDN as being part of the "Platform SDK: Cryptography" and as available on pretty much all versions of Windows.
While that SDK does indeed contain the header (Cspdk.h) it does not contain any .lib file.
Most bizarly, this SDK contains a DLL which merely has skeleton version of CPImportKey:
Code:
BOOL WINAPI
CPImportKey(
IN HCRYPTPROV hProv,
IN CONST BYTE *pbData,
IN DWORD cbDataLen,
IN HCRYPTKEY hPubKey,
IN DWORD dwFlags,
OUT HCRYPTKEY *phKey)
{
*phKey = (HCRYPTKEY)NULL; // Replace NULL with your own structure.
return TRUE;
}
So ... is the CPImportKey function actually implemented by Microsoft somewhere? If so, which DLL ?
Bookmarks