00730 {
00731 LPSTR szKey;
00732 LONG rc;
00733 HKEY hKey;
00734
00735 TRACE("%x %s %s %s %d %p %d\n", dwEncodingType, debugstr_a(pszFuncName),
00736 debugstr_a(pszOID), debugstr_w(pwszValueName), dwValueType, pbValueData,
00737 cbValueData);
00738
00739 if (!GET_CERT_ENCODING_TYPE(dwEncodingType))
00740 return TRUE;
00741
00742 if (!pszFuncName || !pszOID || !pwszValueName)
00743 {
00744 SetLastError(ERROR_INVALID_PARAMETER);
00745 return FALSE;
00746 }
00747
00748 szKey = CRYPT_GetKeyName(dwEncodingType, pszFuncName, pszOID);
00749 rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, szKey, &hKey);
00750 CryptMemFree(szKey);
00751 if (rc)
00752 SetLastError(rc);
00753 else
00754 {
00755 rc = RegSetValueExW(hKey, pwszValueName, 0, dwValueType, pbValueData,
00756 cbValueData);
00757 if (rc)
00758 SetLastError(rc);
00759 RegCloseKey(hKey);
00760 }
00761 return rc ? FALSE : TRUE;
00762 }