Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

CryptSetOIDFunctionValue function

The CryptSetOIDFunctionValue function sets a value for the specified encoding type, function name, OID, and value name.

Syntax


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

Parameters

dwEncodingType [in]

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.

pszFuncName [in]

Name of the function for which the encoding type, OID, and value name is being updated.

pszOID [in]

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.

pwszValueName [in]

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.

dwValueType [in]

Specifies the type of information to be stored as the value's data. This parameter can be one of the following values.

ValueMeaning
REG_DWORD

A 32-bit number.

REG_EXPAND_SZ

A null-terminated Unicode string that contains unexpanded references to environment variables (for example, "%PATH%").

REG_MULTI_SZ

An array of null-terminated Unicode strings, terminated by two NULL characters.

REG_SZ

A null-terminated Unicode string.

 

pbValueData [in]

Points to a buffer containing the data to be stored for the specified value name.

cbValueData [in]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

Library

Crypt32.lib

DLL

Crypt32.dll

See also

OID Support Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.