Windows CE 3.0

This function is a simplified function used to open the most common system certificate store. To open certificate stores with more complex requirements, such as file-based or memory-based stores, use the CertOpenStore function.

LPCTSTR szSubsystemProtocol


[in] HCRYPTPROV handle of a cryptographic service provider (CSP). Set the hProv parameter to NULL to use the default CSP. If hProv is not NULL, it must be a CSP handle created using the CryptAcquireContext function.
[in] String naming a system store. Some example system stores are listed in the following table.
Predefined system store Description
"CA" Certifying authority certificates.
"MY" A certificate store holding "My" certificates with their associated private keys.
"ROOT" Root certificates.
Note   If the system store name provided in this parameter is not the name of an existing system store, a new system store will be created and used. The CertEnumSystemStore function can be used to list the names of existing system stores.

Return Values

If the function succeeds, the return value is a handle to the certificate store.

If the function fails, the return value is NULL. For extended error information, call the GetLastError function. Note that errors from the called CertOpenStore function are propagated to this function.


After the system store is opened, all the standard certificate store functions can be used to manipulate the certificates.

After use, the store should be closed by using the CertCloseStore function.


Runs on Versions Defined in Include Link to
Windows CE OS 3.0 or later Wincrypt.h   Crypt32.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

HCRYPTPROV, CertAddEncodedCertificateToStore, CertCloseStore, CertEnumSystemStore, CertGetCertificateContextProperty, CertOpenStore, CertSaveStore, CryptAcquireContext

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.