CryptCATPutCatAttrInfo function (mscat.h)
[The CryptCATPutCatAttrInfo function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The CryptCATPutCatAttrInfo function allocates memory for a catalog file attribute and adds it to the catalog.
Syntax
CRYPTCATATTRIBUTE * CryptCATPutCatAttrInfo(
[in] HANDLE hCatalog,
[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 functions.
[in] pwszReferenceTag
A pointer to a null-terminated string for 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_DATAASCII or CRYPTCAT_ATTR_DATABASE64.
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
A pointer to a CRYPTCATATTRIBUTE structure that contains the catalog 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 |