47#define WIN32_NO_STATUS
53#include "wine/unicode.h"
61#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
62#define CRYPT_Free(buffer) (LocalFree(buffer))
66 static const WCHAR KEYSTR[] = {
67 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
68 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
69 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',
'\\',
70 'D',
'e',
'f',
'a',
'u',
'l',
't',
's',
'\\',
71 'P',
'r',
'o',
'v',
'i',
'd',
'e',
'r',
'\\',0
87 static const WCHAR MACHINESTR[] = {
88 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
89 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
90 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',
'\\',
91 'D',
'e',
'f',
'a',
'u',
'l',
't',
's',
'\\',
92 'P',
'r',
'o',
'v',
'i',
'd',
'e',
'r',
' ',
'T',
'y',
'p',
'e',
's',
'\\',
93 'T',
'y',
'p',
'e',
' ',
'X',
'X',
'X',0
95 static const WCHAR USERSTR[] = {
96 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
97 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
98 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',
'\\',
99 'P',
'r',
'o',
'v',
'i',
'd',
'e',
'r',
' ',
'T',
'y',
'p',
'e',
' ',
'X',
'X',
'X',0
109 *(--
ptr) = (dwType % 10) +
'0';
110 *(--
ptr) = ((dwType / 10) % 10) +
'0';
111 *(--
ptr) = (dwType / 100) +
'0';
138 else if (strsize < 0)
171 wcount =
min( wcount, wstrsize/
sizeof(
WCHAR) );
184 if (!lpszImage || !
pData)
190 FIXME(
"(%s, %p): not verifying image\n", lpszImage,
pData);
200#define CRYPT_GetProvFunc(name) \
201 if ( !(provider->pFuncs->p##name = (void*)GetProcAddress(provider->hModule, #name)) ) goto error
202#define CRYPT_GetProvFuncOpt(name) \
203 provider->pFuncs->p##name = (void*)GetProcAddress(provider->hModule, #name)
273#undef CRYPT_GetProvFunc
274#undef CRYPT_GetProvFuncOpt
279 static const WCHAR cryptographyW[] = {
280 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
281 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
282 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',0 };
283 static const WCHAR machineGuidW[] = {
284 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'G',
'u',
'i',
'd',0 };
300 static const WCHAR uuidFmt[] = {
301 '%',
'0',
'8',
'x',
'-',
'%',
'0',
'4',
'x',
'-',
302 '%',
'0',
'4',
'x',
'-',
'%',
'0',
'2',
'x',
303 '%',
'0',
'2',
'x',
'-',
'%',
'0',
'2',
'x',
304 '%',
'0',
'2',
'x',
'%',
'0',
'2',
'x',
305 '%',
'0',
'2',
'x',
'%',
'0',
'2',
'x',
367 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
368 static const WCHAR typeW[] = {
'T',
'y',
'p',
'e',0};
369 static const WCHAR imagepathW[] = {
'I',
'm',
'a',
'g',
'e',
' ',
'P',
'a',
't',
'h',0};
389 if (!pszProvider || !*pszProvider)
395 TRACE(
"No provider registered for crypto provider type %d.\n", dwProvType);
403 TRACE(
"No type registered for crypto provider type %d.\n", dwProvType);
409 TRACE(
"Did not find registry entry of crypto provider for %s.\n",
debugstr_w(keyname));
420 TRACE(
"error %d reading size of 'Name' from registry\n",
r );
434 TRACE(
"error %d reading 'Name' from registry\n",
r );
446 strcpyW(provname, pszProvider);
464 if (
type != dwProvType)
466 TRACE(
"Crypto provider has wrong type (%d vs expected %d).\n",
type, dwProvType);
474 TRACE(
"error %d reading size of 'Image Path' from registry\n",
r );
488 TRACE(
"error %d reading 'Image Path' from registry\n",
r );
704 TRACE(
"(0x%lx, %d, %p)\n",
hProv, dwLen, pbBuffer);
718 return prov->
pFuncs->pCPGenRandom(prov->
hPrivate, dwLen, pbBuffer);
766 hash->pProvider = prov;
807 TRACE(
"(0x%lx, 0x%lx, %d, %08x, %p, %p)\n",
hKey,
hHash,
Final,
dwFlags,
pbData,
pdwDataLen);
817 prov =
key->pProvider;
845 TRACE(
"(0x%lx, 0x%08x, 0x%lx, 0x%08x, %p)\n",
hProv, Algid, hBaseData,
dwFlags, phKey);
863 key->pProvider = prov;
911 prov =
hash->pProvider;
951 prov =
key->pProvider;
990 if (!prov->
pFuncs->pCPDuplicateHash)
1046 if (!prov->
pFuncs->pCPDuplicateKey)
1100 TRACE(
"(0x%lx, 0x%lx, %d, %08x, %p, %p, %d)\n",
hKey,
hHash,
Final,
dwFlags,
pbData,
pdwDataLen,
dwBufLen);
1109 prov =
key->pProvider;
1140 static const WCHAR providerW[] = {
1141 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1142 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
1143 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',
'\\',
1144 'D',
'e',
'f',
'a',
'u',
'l',
't',
's',
'\\',
1145 'P',
'r',
'o',
'v',
'i',
'd',
'e',
'r',0
1147 static const WCHAR typeW[] = {
'T',
'y',
'p',
'e',0};
1191 if (dwIndex >= numkeys)
1287 DWORD keylen, numkeys, dwType;
1290 static const WCHAR KEYSTR[] = {
1291 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1292 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
1293 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',
'\\',
1294 'D',
'e',
'f',
'a',
'u',
'l',
't',
's',
'\\',
1295 'P',
'r',
'o',
'v',
'i',
'd',
'e',
'r',
' ',
'T',
'y',
'p',
'e',
's',0
1297 static const WCHAR typenameW[] = {
'T',
'y',
'p',
'e',
'N',
'a',
'm',
'e',0};
1316 RegQueryInfoKeyW(
hKey,
NULL,
NULL,
NULL, &numkeys, &keylen,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
1317 if (dwIndex >= numkeys)
1338 ch = keyname +
strlenW(keyname);
1422 TRACE(
"(0x%lx, 0x%lx, %d, %08x, %p, %p)\n",
hKey, hExpKey, dwBlobType,
dwFlags,
pbData,
pdwDataLen);
1431 prov =
key->pProvider;
1432 return prov->
pFuncs->pCPExportKey(prov->
hPrivate,
key->hPrivate, expkey ? expkey->hPrivate : 0,
1469 key->pProvider = prov;
1509 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
1521 if (dwProvType > 999)
1625 prov =
hash->pProvider;
1664 prov =
key->pProvider;
1723 TRACE(
"(0x%lx, %d, %p)\n",
hProv, dwKeySpec, phUserKey);
1741 key->pProvider = prov;
1790 prov =
hash->pProvider;
1829 prov =
hash->pProvider;
1856 TRACE(
"(0x%lx, %p, %d, 0x%lx, %08x, %p)\n",
hProv,
pbData, dwDataLen, hPubKey,
dwFlags, phKey);
1858 if (!prov || !
pbData || !dwDataLen || !phKey ||
1872 importkey->pProvider = prov;
1881 importkey->dwMagic = 0;
1914 TRACE(
"(0x%lx, %d, %s, %08x, %p, %p)\n",
1929 prov =
hash->pProvider;
1930 return prov->
pFuncs->pCPSignHash(prov->
hPrivate,
hash->hPrivate, dwKeySpec, sDescription,
1931 dwFlags, pbSignature, pdwSigLen);
1945 TRACE(
"(0x%lx, %d, %s, %08x, %p, %p)\n",
1984 prov =
hash->pProvider;
2018 prov =
key->pProvider;
2070 HKEY hProvKey, hTypeKey;
2072 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
2099 keyname, &hTypeKey))
2120 keyname, &hProvKey))
2197 FIXME(
"PP_USE_HARDWARE_RNG: What do I do with this?\n");
2198 FIXME(
"\tLetting the CSP decide.\n");
2245 TRACE(
"(0x%lx, %p, %d, 0x%lx, %s, %08x)\n",
hHash, pbSignature,
2256 prov =
hash->pProvider;
2257 return prov->
pFuncs->pCPVerifySignature(prov->
hPrivate,
hash->hPrivate, pbSignature, dwSigLen,
2272 TRACE(
"(0x%lx, %p, %d, 0x%lx, %s, %08x)\n",
hHash, pbSignature,
2383 if (dev_random != -1)
2386 read(dev_random, pbBuffer, dwLen) == (
ssize_t)dwLen)
2394 FIXME(
"couldn't open /dev/urandom\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR nameW[]
void user(int argc, const char *argv[])
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
#define CRYPT_Free(buffer)
BOOL WINAPI CryptExportKey(HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType, DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
BOOL WINAPI CryptCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, DWORD dwFlags, HCRYPTHASH *phHash)
BOOL WINAPI CryptGenRandom(HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
BOOL WINAPI SystemFunction035(LPCSTR lpszDllFilePath)
BOOL WINAPI CryptSetProvParam(HCRYPTPROV hProv, DWORD dwParam, const BYTE *pbData, DWORD dwFlags)
BOOL WINAPI CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC import, PVOID callback, PVOID context)
BOOL WINAPI CryptDestroyKey(HCRYPTKEY hKey)
#define CRYPT_Alloc(size)
BOOL WINAPI CryptDestroyHash(HCRYPTHASH hHash)
static HWND crypt_hWindow
BOOL WINAPI CryptSignHashA(HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
BOOL WINAPI CryptDuplicateKey(HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags, HCRYPTKEY *phKey)
BOOL WINAPI CryptEnumProvidersA(DWORD dwIndex, DWORD *pdwReserved, DWORD dwFlags, DWORD *pdwProvType, LPSTR pszProvName, DWORD *pcbProvName)
BOOL WINAPI CryptVerifySignatureA(HCRYPTHASH hHash, const BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags)
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
static PWSTR CRYPT_GetProvKeyName(PCWSTR pProvName)
BOOL WINAPI CryptDuplicateHash(HCRYPTHASH hHash, DWORD *pdwReserved, DWORD dwFlags, HCRYPTHASH *phHash)
BOOL WINAPI CryptHashData(HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
#define CRYPT_GetProvFunc(name)
BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *phProv, LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
BOOL WINAPI CryptDeriveKey(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData, DWORD dwFlags, HCRYPTKEY *phKey)
BOOL WINAPI CryptEnumProviderTypesW(DWORD dwIndex, DWORD *pdwReserved, DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszTypeName, DWORD *pcbTypeName)
void WINAPI CloseEncryptedFileRaw(PVOID context)
BOOL WINAPI CryptContextAddRef(HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFlags)
#define CRYPT_GetProvFuncOpt(name)
static PCRYPTPROV CRYPT_LoadProvider(PCWSTR pImage)
static BOOL CALLBACK CRYPT_VerifyImage(LPCSTR lpszImage, BYTE *pData)
static void CALLBACK CRYPT_ReturnhWnd(HWND *phWnd)
BOOL WINAPI CryptGenKey(HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKEY *phKey)
BOOL WINAPI CryptEnumProvidersW(DWORD dwIndex, DWORD *pdwReserved, DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszProvName, DWORD *pcbProvName)
BOOL WINAPI CryptDecrypt(HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
BOOL WINAPI CryptSetProviderW(LPCWSTR pszProvName, DWORD dwProvType)
BOOL WINAPI SystemFunction030(LPCVOID b1, LPCVOID b2)
DWORD WINAPI OpenEncryptedFileRawA(LPCSTR filename, ULONG flags, PVOID *context)
static PWSTR CRYPT_GetTypeKeyName(DWORD dwType, BOOL user)
BOOL WINAPI CryptVerifySignatureW(HCRYPTHASH hHash, const BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags)
BOOL WINAPI CryptEnumProviderTypesA(DWORD dwIndex, DWORD *pdwReserved, DWORD dwFlags, DWORD *pdwProvType, LPSTR pszTypeName, DWORD *pcbTypeName)
BOOL WINAPI CryptGetUserKey(HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUserKey)
BOOL WINAPI CryptGetKeyParam(HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
BOOL WINAPI CryptSetKeyParam(HCRYPTKEY hKey, DWORD dwParam, const BYTE *pbData, DWORD dwFlags)
BOOL WINAPI CryptSetHashParam(HCRYPTHASH hHash, DWORD dwParam, const BYTE *pbData, DWORD dwFlags)
static BOOL CRYPT_UnicodeToANSI(LPCWSTR wstr, LPSTR *str, int strsize)
NTSTATUS WINAPI SystemFunction041(PVOID memory, ULONG length, ULONG flags)
BOOL WINAPI CryptGetDefaultProviderW(DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags, LPWSTR pszProvName, DWORD *pcbProvName)
BOOL WINAPI CryptSetProviderExW(LPCWSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags)
NTSTATUS WINAPI SystemFunction040(PVOID memory, ULONG length, ULONG flags)
BOOL WINAPI CryptSetProviderA(LPCSTR pszProvName, DWORD dwProvType)
BOOLEAN WINAPI SystemFunction036(PVOID pbBuffer, ULONG dwLen)
static BOOL CRYPT_ANSIToUnicode(LPCSTR str, LPWSTR *wstr, int wstrsize)
BOOL WINAPI CryptSignHashW(HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCWSTR pszContainer, LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC export, PVOID callback, PVOID context)
DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR filename, ULONG flags, PVOID *context)
BOOL WINAPI CryptGetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
BOOL WINAPI CryptSetProviderExA(LPCSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags)
BOOL WINAPI CryptGetDefaultProviderA(DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags, LPSTR pszProvName, DWORD *pcbProvName)
BOOL WINAPI CryptEncrypt(HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen, DWORD dwBufLen)
static void CRYPT_CreateMachineGuid(void)
BOOL WINAPI CryptImportKey(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey)
BOOL WINAPI CryptHashSessionKey(HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags)
struct tagCRYPTPROV * PCRYPTPROV
struct tagCRYPTHASH * PCRYPTHASH
struct tagCRYPTKEY * PCRYPTKEY
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define ERROR_NO_MORE_ITEMS
#define ERROR_INVALID_HANDLE
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR pubkey[]
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
static const WCHAR typeW[]
FxWmiProvider * pProvider
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLuint GLsizei bufsize
#define ERROR_FILE_NOT_FOUND
static IPrintDialogCallback callback
static CRYPT_DATA_BLOB b2[]
static CRYPT_DATA_BLOB b1[]
static char memory[1024 *256]
RPC_STATUS WINAPI UuidCreate(UUID *Uuid)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
DWORD WINAPI GetLastError(void)
DWORD(WINAPI * PFE_IMPORT_FUNC)(_Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData, _In_opt_ PVOID pvCallbackContext, _Inout_ PULONG ulLength)
DWORD(WINAPI * PFE_EXPORT_FUNC)(_In_reads_bytes_(ulLength) PBYTE pbData, _In_opt_ PVOID pvCallbackContext, _In_ ULONG ulLength)
_Reserved_ DWORD * pdwReserved
_Reserved_ DWORD _In_ DWORD _Out_ DWORD _Out_writes_bytes_to_opt_ pcbProvName LPSTR _Inout_ DWORD * pcbProvName
_In_ HCRYPTHASH _In_ BOOL Final
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ DWORD _In_ DWORD dwBufLen
#define CRYPT_MACHINE_DEFAULT
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define CRYPT_DELETEKEYSET
_Reserved_ DWORD _In_ DWORD _Out_ DWORD * pdwProvType
#define PP_USE_HARDWARE_RNG
#define CRYPT_USER_DEFAULT
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE _Inout_ DWORD * pdwDataLen
_Reserved_ DWORD _In_ DWORD _Out_writes_bytes_to_opt_ pcbProvName LPSTR pszProvName
_Reserved_ DWORD _In_ DWORD _Out_ DWORD _Out_writes_bytes_to_opt_ pcbTypeName LPSTR _Inout_ DWORD * pcbTypeName
#define CRYPT_DELETE_DEFAULT
#define NTE_PROV_DLL_NOT_FOUND
#define NTE_BAD_PROV_TYPE
#define NTE_PROVIDER_DLL_FAIL
#define NTE_KEYSET_NOT_DEF
#define NTE_PROV_TYPE_ENTRY_BAD
#define NTE_PROV_TYPE_NO_MATCH
#define NTE_PROV_TYPE_NOT_DEF
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER