CryptCATPutAttrInfo function (mscat.h)
[The CryptCATPutAttrInfo function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The CryptCATPutAttrInfo function allocates memory for an attribute and adds it to a catalog member.
Syntax
CRYPTCATATTRIBUTE * CryptCATPutAttrInfo(
[in] HANDLE hCatalog,
[in] CRYPTCATMEMBER *pCatMember,
[in] LPWSTR pwszReferenceTag,
[in] DWORD dwAttrTypeAndAction,
[in] DWORD cbData,
[in] BYTE *pbData
);
Parameters
[in] hCatalog
A handle to the catalog obtained from the CryptCATOpen or CryptCATHandleFromStore function.
[in] pCatMember
A pointer to a CRYPTCATMEMBER structure that contains the catalog member.
[in] pwszReferenceTag
A pointer to a null-terminated string that contains the name of the attribute.
[in] dwAttrTypeAndAction
A value that represents a bitwise combination of the following flags. The caller must at least specify CRYPTCAT_ATTR_DATABASE64 or CRYPTCAT_ATTR_DATAASCII.
Value | Meaning |
---|---|
|
The attribute is authenticated. |
|
The attribute is unauthenticated. |
|
The attribute is an ASCII string. |
|
The attribute is a cryptographic object identifier (OID). |
|
The attribute contains simple ASCII characters that should not be decoded. |
|
The attribute is in base 64 format. |
|
The attribute replaces the value for an existing attribute. |
[in] cbData
A value that specifies the number of bytes in the pbData buffer.
[in] pbData
A pointer to a memory buffer that contains the attribute value.
Return value
Upon success, this function returns a pointer to a CRYPTCATATTRIBUTE structure that contains the assigned attribute. The caller must not free this pointer or any of its members.
If this function returns NULL, additional error information can be obtained by calling the GetLastError function. GetLastError will return one of the following error codes.
Return code | Description |
---|---|
|
One or more of the parameters are not valid. |
|
The operating system ran out of memory during the operation. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | mscat.h |
Library | Wintrust.lib |
DLL | Wintrust.dll |