This function returns from a certificate store a subject certificate context uniquely identified by its issuer and serial number.
PCCERT_CONTEXT WINAPI CertGetSubjectCertificateFromStore( HCERTSTORE hCertStore, DWORD dwCertEncodingType, PCERT_INFO pCertId );
- [in] Handle of a certificate store.
- [in] Specifies the type of encoding used. Currently, only X509_ASN_ENCODING is used; however, additional encoding types may be added in the future.
- [in] Pointer to a CERT_INFO structure. Only the Issuer and SerialNumber members are used.
The returned certificate might not be valid. Usually, it is verified when using CertGetIssuerCertificateFromStore to get its issuer certificate.
For extended error information, call the GetLastError function. The following table lists one possible error code.
|CRYPT_E_NOT_FOUND||The subject certificate was not found in the store.|
The CertDuplicateCertificateContext function can be called to make a duplicate certificate.
The desktop platform supports the PKCS_7_ASN_ENCODING flag, but Windows CE does not. Windows CE ignores the flag when it is specified.
|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.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.