CertUnregisterPhysicalStore function (wincrypt.h)

The CertUnregisterPhysicalStore function removes a physical store from a specified system store collection. CertUnregisterPhysicalStore can also be used to delete the physical store.

Syntax

BOOL CertUnregisterPhysicalStore(
  [in] const void *pvSystemStore,
  [in] DWORD      dwFlags,
  [in] LPCWSTR    pwszStoreName
);

Parameters

[in] pvSystemStore

A pointer to an identifier of the system store collection from which the physical store is to be removed. It is either to a null-terminated Unicode string or to a CERT_SYSTEM_STORE_RELOCATE_PARA structure. For information about using the structure and on appending a ServiceName or ComputerName to the end of the system store name string, see CertRegisterSystemStore.

[in] dwFlags

The high word of the dwFlags parameter specifies the location of the system store. For information about defined high-word flags and on appending ServiceName, UserNames, and ComputerNames to the end of the system store name, see CertRegisterSystemStore.

The following low-word values are also defined. They can be combined using bitwise-OR operations with high-word values.

Value Meaning
CERT_SYSTEM_STORE_RELOCATE_FLAG
The system store is not in its default registry location and pvSystemStore must be a pointer to a CERT_SYSTEM_STORE_RELOCATE_PARA structure.
CERT_STORE_DELETE_FLAG
The physical store is first removed from the system store collection and is then deleted.

[in] pwszStoreName

Null-terminated Unicode string that contains the name of the physical store.

Return value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header wincrypt.h
Library Crypt32.lib
DLL Crypt32.dll

See also

CERT_SYSTEM_STORE_RELOCATE_PARA

CertEnumPhysicalStore

CertEnumSystemStore

CertEnumSystemStoreLocation

CertRegisterPhysicalStore

CertRegisterSystemStore

Certificate Store Functions