Group: Cryptography Reference - Library: crypt32
HCERTSTORE WINAPI CertOpenSystemStore(
HCRYPTPROV_LEGACY hprov,
LPTCSTR szSubsystemProtocol
);
DECLARE INTEGER CertOpenSystemStore IN crypt32;
INTEGER hprov,;
STRING szSubsystemProtocol
hprov [in] This parameter is not used and should be set to NULL.
szSubsystemProtocol [in] A string that names a system store (CA, MY, ROOT, SPC).
If the function succeeds, the function returns a handle to the certificate store.
If the system store name provided in szSubsystemProtocol parameter is not the name of an existing system store, a new system store will be created and used.
After use, the store should be closed by using CertCloseStore.
#DEFINE CERT_CLOSE_STORE_FORCE_FLAG 1
#DEFINE CERT_CLOSE_STORE_CHECK_FLAG 2
LOCAL hStore
hStore = CertOpenSystemStore(0, "CA")
? "Cert.store handle:", hStore
IF hStore = 0
? "Error:", GetLastError()
ELSE
= CertCloseStore(hStore, 0)
ENDIF