Expand Minimize
EN
Tätä sisältöä ei ole saatavilla kielelläsi. Tässä on englanninkielinen versio.

CertFreeCertificateContext function

The CertFreeCertificateContext function frees a certificate context by decrementing its reference count. When the reference count goes to zero, CertFreeCertificateContext frees the memory used by a certificate context.

To free a context obtained by a get, duplicate, or create function, call the appropriate free function. To free a context obtained by a find or enumerate function, either pass it in as the previous context parameter to a subsequent invocation of the function, or call the appropriate free function. For more information, see the reference topic for the function that obtains the context.

Syntax


BOOL WINAPI CertFreeCertificateContext(
  _In_  PCCERT_CONTEXT pCertContext
);

Parameters

pCertContext [in]

A pointer to the CERT_CONTEXT to be freed.

Return value

The function always returns nonzero.

Examples

The following example shows how to free a certificate context. For another example that uses this function, see Example C Program: Certificate Store Operations.


//--------------------------------------------------------------------
//    Free a certificate context.
//    pCertCtx is a previously assigned pointer
//    to a CERT_CONTEXT structure.

if (pCertCtx)
    CertFreeCertificateContext(pCertCtx);

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

Library

Crypt32.lib

DLL

Crypt32.dll

See also

Certificate Functions
CertFreeCRLContext

 

 

Yhteisösisältö

Lisää
Näytä:
© 2014 Microsoft