CertUnregisterSystemStore function
The CertUnregisterSystemStore function unregisters a specified system store.
Syntax
BOOL WINAPI CertUnregisterSystemStore( _In_ const void *pvSystemStore, _In_ DWORD dwFlags );
Parameters
- pvSystemStore [in]
-
Identifies the system store to be unregistered. It points 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.
- dwFlags [in]
-
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 and can be combined with high-word values using a bitwise-OR operation.
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 system store is deleted after it has been unregistered.
Return value
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
Examples
The following example shows deleting a specified system store.
//-------------------------------------------------------------------- // Declare and initialize variables. DWORD dwFlags = CERT_SYSTEM_STORE_CURRENT_USER; LPCWSTR pvSystemName = L"NEWSTORE"; //-------------------------------------------------------------------- // Unregister the system store named "NEWSTORE". // This assumes that a system store named "NEWSTORE" is // registered. if(CertUnregisterSystemStore( pvSystemName, dwFlags)) { printf("System store %S has been unregistered.\n",pvSystemName); } else { printf("The system store was not unregistered.\n"); }
For another example that uses this function, see Example C Program: Listing System and Physical Stores .
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- CERT_SYSTEM_STORE_RELOCATE_PARA
- CertEnumPhysicalStore
- CertEnumSystemStore
- CertEnumSystemStoreLocation
- Certificate Store Functions
- CertRegisterPhysicalStore
- CertRegisterSystemStore
- CertUnregisterPhysicalStore