CertDuplicateCertificateContext function (wincrypt.h)
The CertDuplicateCertificateContext function duplicates a certificate context by incrementing its reference count.
PCCERT_CONTEXT CertDuplicateCertificateContext( [in] PCCERT_CONTEXT pCertContext );
A pointer to the CERT_CONTEXT structure for which the reference count is incremented.
Currently, a copy is not made of the context, and the returned pointer to a context has the same value as the pointer to a context that was input. If the pointer passed into this function is NULL, NULL is returned. When you have finished using the duplicate context, decrease its reference count by calling the CertFreeCertificateContext function.
|Minimum supported client||Windows XP [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2003 [desktop apps | UWP apps]|