Partager via


CertGetStoreProperty (Compact 2013)

3/28/2014

This function retrieves a store property.

Syntax

BOOL CertGetStoreProperty(
  HCERTSTORE hCertStore,
  DWORD dwPropId,
  void* pvData,
  DWORD* pcbData
);

Parameters

  • hCertStore
    [in] Handle to an open certificate store.
  • dwPropId
    [in] Specifies one of a range of store properties. There is one predefined store property, CERT_STORE_LOCALIZED_NAME_PROP_ID, which is the localized name of the store.

    User-defined properties must be outside the current range of values for predefined context properties. Currently, user-defined dwPropId values begin at 4,096.

  • pvData
    [out] Pointer to a buffer that receives the data as determined by the dwPropId parameter. For the CERT_STORE_LOCALIZED_NAME_PROP_ID property, the data is the localized name of the store, and the pvData parameter points to a NULL-terminated Unicode, wide-character string. For other values for the dwPropId parameter, the pvData parameter points to an array of bytes.

    This parameter can be NULL to set the size of this information for memory allocation purposes.

  • pcbData
    [in, out] On input, pointer to a DWORD value that specifies the size, in bytes, of the pvData buffer. On output, the DWORD value contains the number of bytes stored in the buffer.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE.

If the store property is found, the function returns TRUE, pvData points to the property, and pcbData points to the length of the string. If the store property is not found, the function returns FALSE and the GetLastError function returns CRYPT_E_NOT_FOUND.

Remarks

Store property identifiers are properties applicable to an entire store. They are not properties on an individual certificate context. Currently, no store properties are persisted.

Requirements

Header

wincrypt.h

Library

crypt32.lib

See Also

Reference

Certificates Functions
CertSetStoreProperty