CertUnregisterSystemStore

[This is preliminary documentation and subject to change.]

The CertUnregisterSystemStore function unregisters a specified system store.

#include <wincrypt.h>
BOOL WINAPI CertUnregisterSystemStore(
  const void *pvSystemStore,   // in
  DWORD dwFlags                //  in
);
 

Parameters

pvSystemStore
Identifier of the system store to be unregistered. Points to either a NULL terminated unicode string or to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. See CertRegisterSystemStore for details on using the data structure and on prepending a ServiceName or Computer name to the system store name string.
dwFlags
The HIWORD of the dwFlags parameter is used to specify the location of the system store. See CertRegisterSystemStore for details on defined HIWORD dwFlags and prepending ServiceName, UserNames, and ComputerNames to the system store name.

The following LOWORD dwFlags are also defined and may be ORed with HIWORD flags.

CERT_SYSTEM_STORE_RELOCATE_FLAG
When this flag is set, the system store is not in its default registry location and pvSystemStore must be a pointer to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure.
CERT_STORE_DELETE_FLAG
When this flag is set the system store is deleted after it has been unregistered.

Return Values

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

Remarks

To access a remote store, the Security Permissions in the registry keys on that remote computer must be set to allow access. For more information on setting Security Permissions in an NT registry, see MDSN Article ID Q155363. For information on what to do to enable remote administration on a Win95 registry.

Example

LPCWSTR pwszSystemName=L"TempSystemStore";
DWORD   dwFlags=CERT_SYSTEM_STORE_CURRENT_USER;
//
if(CertUnregisterSystemStore(
pwszSystemName,
dwFlags
      ))
printf("System store %S has been unregistered.\n",pwszSystemName);
else
printf("The system store was not unregistered.\n");
 

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

CertRegisterSystemStore, CertRegisterPhysicalStore, CertUnregisterPhysicalStore, CertEnumSystemStoreLocation, CertEnumSystemStore, CertEnumPhysicalStore