CertSetStoreProperty

[This is preliminary documentation and subject to change.]

The CertSetStoreProperty function sets a store property.

# include <wincrypt.h>
BOOL CertSetStoreProperty(
  HCERTSTORE hCertStore,      // in
  DWORD dwPropId,             // in
  DWORD dwFlags,              // in
  const void *pvData          // in
);
 

Parameters

hCertStore
Handle for the certificate store.
dwPropId
DWORD for one of a range of defined store properties. Values for user defined properties should be outside the current range of predefined context properties values. Currently, user defined pwPropId values should begin at 4096. There is one predefined store property, CERT_STORE_LOCALIZED_NAME_PROP_ID, the localized name of the store.
dwFlags
Currently unused. Should be set to 0.
pvData
The type definition for pvData depends on the dwPropId value. For CERT_STORE_LOCALIZED_NAME_PROP_ID, pvData points to a CRYPT_DATA_BLOB. The pbData member of that structure is a pointer to a NULL terminated, unicode character string. The cbData member of that structure holds the size of the string.

For all user defined dwPropId values, pvData is a pointer to an encoded PCRYPT_DATA_BLOB,

If a value already exists for the selected property, the old value is replaced.

Calling this function with pvData set to NULL deletes a property.

Return Values

TRUE if the function succeeded. FALSE if the function failed.

Remarks

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

Example

See CertGetStoreProperty for example code.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in wincrypt.h.
  Import Library: Use crypt32.lib.

See Also

CertGetStoreProperty