00693 {
00694 LPSTR szKey;
00695 LONG rc;
00696 HKEY hKey;
00697
00698 TRACE("%x %s %s %s %p %p %p\n", dwEncodingType, debugstr_a(pszFuncName),
00699 debugstr_a(pszOID), debugstr_w(pwszValueName), pdwValueType, pbValueData,
00700 pcbValueData);
00701
00702 if (!GET_CERT_ENCODING_TYPE(dwEncodingType))
00703 return TRUE;
00704
00705 if (!pszFuncName || !pszOID || !pwszValueName)
00706 {
00707 SetLastError(ERROR_INVALID_PARAMETER);
00708 return FALSE;
00709 }
00710
00711 szKey = CRYPT_GetKeyName(dwEncodingType, pszFuncName, pszOID);
00712 rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, szKey, &hKey);
00713 CryptMemFree(szKey);
00714 if (rc)
00715 SetLastError(rc);
00716 else
00717 {
00718 rc = RegQueryValueExW(hKey, pwszValueName, NULL, pdwValueType,
00719 pbValueData, pcbValueData);
00720 if (rc)
00721 SetLastError(rc);
00722 RegCloseKey(hKey);
00723 }
00724 return rc ? FALSE : TRUE;
00725 }