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.
HCERTSTORE WINAPI CertOpenSystemStore( HCRYPTPROV hProv, LPCTSTR szSubsystemProtocol );
[in] HCRYPTPROV handle to 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] Null-terminated string that contains the name of a system store. The following table shows example system stores.
Predefined system store Description
Certifying authority certificates.
A certificate store holding MY certificates and their associated private keys.
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.