[This is preliminary documentation and subject to change.]
The CertUnregisterPhysicalStore function removes a physical store from a specified system store collection. CertUnregisterPhysicalStore may also be used to delete the physical store.
#include <wincrypt.h>
BOOL WINAPI CertUnregisterPhysicalStore(
const void *pvSystemStore, // in
DWORD dwFlags, // in
LPCWSTR pwszStoreName // in
);
The following LOWORD dwFlags are also defined and may be ORed with HIWORD flags.
TRUE if the function succeeded. FALSE if the function failed.
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.
LPCWSTR pwszSystemStore= L"My";
LPCWSTR pwszPStore=L"TestPStore";
DWORD dwFlags=CERT_SYSTEM_STORE_CURRENT_USER |CERT_STORE_DELETE_FLAG ;
//
if(CertUnregisterPhysicalStore(
pwszSystemStore,
dwFlags,
pwszPStore
))
printf("Store %S has been unregistered. \n", pwszPStore);
else
printf("The unregister operation failed.\n");
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in wincrypt.h.
Import Library: Use crypt32.lib.
CertRegisterSystemStore, CertRegisterPhysicalStore, CertEnumSystemStoreLocation, CertEnumSystemStore, CertEnumPhysicalStore