Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

BOOL WINAPI CryptSetOIDFunctionValue ( DWORD  dwEncodingType,
LPCSTR  pszFuncName,
LPCSTR  pszOID,
LPCWSTR  pwszValueName,
DWORD  dwValueType,
const BYTE pbValueData,
DWORD  cbValueData 
)

Definition at line 727 of file oid.c.

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 }


Generated on Fri Feb 10 05:27:55 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.