The CertEnumCRLsInStore function retrieves the first or next certificate revocation list (CRL) context in a certificate store. Used in a loop, this function can retrieve in sequence all CRL contexts in a certificate store.
PCCRL_CONTEXT CertEnumCRLsInStore( HCERTSTORE hCertStore, PCCRL_CONTEXT pPrevCrlContext );
Handle of a certificate store.
A pointer to the previous CRL_CONTEXT structure found. The pPrevCrlContext parameter must be NULL to get the first CRL in the store. Successive CRLs are enumerated by setting pPrevCrlContext to the pointer returned by a previous call to the function. This function frees the CRL_CONTEXT referenced by non-NULL values of this parameter. The enumeration skips any CRLs previously deleted by CertDeleteCRLFromStore.
If the function succeeds, the return value is a pointer to the next CRL_CONTEXT in the store.
NULL is returned if the function fails. For extended error information, call GetLastError. Some possible error codes follow.
||The handle in the hCertStore parameter is not the same as that in the certificate context pointed to by pPrevCrlContext.|
||No CRL was found. This happens if the store is empty or the end of the store's list is reached.|
The returned pointer is freed when it is passed as the pPrevCrlContext on a subsequent call to the function. Otherwise, the pointer must explicitly be freed by calling CertFreeCRLContext. A pPrevCrlContext that is not NULL is always freed when passed to this function through a call to CertFreeCRLContext, even if the function itself returns an error.
|Minimum supported client||Windows XP [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2003 [desktop apps | UWP apps]|