Export (0) Print
Expand All
Expand Minimize

CryptCATPutAttrInfo function

[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* WINAPI CryptCATPutAttrInfo(
  _In_  HANDLE hCatalog,
  _In_  CRYPTCATMEMBER *pCatMember,
  _In_  LPWSTR pwszReferenceTag,
  _In_  DWORD dwAttrTypeAndAction,
  _In_  DWORD cbData,
  _In_  BYTE *pbData
);

Parameters

hCatalog [in]

A handle to the catalog obtained from the CryptCATOpen or CryptCATHandleFromStore function.

pCatMember [in]

A pointer to a CRYPTCATMEMBER structure that contains the catalog member.

pwszReferenceTag [in]

A pointer to a null-terminated string that contains the name of the attribute.

dwAttrTypeAndAction [in]

A value that represents a bitwise combination of the following flags. The caller must at least specify CRYPTCAT_ATTR_DATABASE64 or CRYPTCAT_ATTR_DATAASCII.

ValueMeaning
CRYPTCAT_ATTR_AUTHENTICATED
0x10000000

The attribute is authenticated.

CRYPTCAT_ATTR_UNAUTHENTICATED
0x20000000

The attribute is unauthenticated.

CRYPTCAT_ATTR_NAMEASCII
0x00000001

The attribute is an ASCII string.

CRYPTCAT_ATTR_NAMEOBJID
0x00000002

The attribute is a cryptographic object identifier (OID).

CRYPTCAT_ATTR_DATAASCII
0x00010000

The attribute contains simple ASCII characters that should not be decoded.

CRYPTCAT_ATTR_DATABASE64
0x00020000

The attribute is in base 64 format.

CRYPTCAT_ATTR_DATAREPLACE
0x00040000

The attribute replaces the value for an existing attribute.

 

cbData [in]

A value that specifies the number of bytes in the pbData buffer.

pbData [in]

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 codeDescription
ERROR_INVALID_PARAMETER

One or more of the parameters are not valid.

ERROR_NOT_ENOUGH_MEMORY

The operating system ran out of memory during the operation.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mscat.h

Library

Wintrust.lib

DLL

Wintrust.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft