CryptSetOIDFunctionValue function (wincrypt.h)
The CryptSetOIDFunctionValue function sets a value for the specified encoding type, function name, OID, and value name.
Syntax
BOOL CryptSetOIDFunctionValue(
[in] DWORD dwEncodingType,
[in] LPCSTR pszFuncName,
[in] LPCSTR pszOID,
[in] LPCWSTR pwszValueName,
[in] DWORD dwValueType,
[in] const BYTE *pbValueData,
[in] DWORD cbValueData
);
Parameters
[in] dwEncodingType
Specifies the encoding type to be matched. Currently, only X509_ASN_ENCODING and PKCS_7_ASN_ENCODING are being used; however, additional encoding types may be added in the future. To match both current encoding types, use:
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING.
[in] pszFuncName
Name of the function for which the encoding type, OID, and value name is being updated.
[in] pszOID
If the high-order word of the object identifier (OID) is nonzero, pszOID is a pointer to either an OID string such as "2.5.29.1" or an ASCII string such as "file". If the high-order word of the OID is zero, the low-order word specifies the integer identifier to be used as the object identifier.
[in] pwszValueName
A pointer to a Unicode string containing the name of the value to set. If a value with this name is not already present, the function creates it.
[in] dwValueType
Specifies the type of information to be stored as the value's data. This parameter can be one of the following values.
[in] pbValueData
Points to a buffer containing the data to be stored for the specified value name.
[in] cbValueData
Specifies the size, in bytes, of the information pointed to by the pbValueData parameter. If the data is of type REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ, the size must include the terminating NULL wide character.
Return value
If the function succeeds, the return value is nonzero (TRUE).
If the function fails, the return value is zero (FALSE).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | wincrypt.h |
Library | Crypt32.lib |
DLL | Crypt32.dll |