PFNCMFILTERPROC callback function (cryptdlg.h)

The PFNCMFILTERPROC function is a filter procedure that filters each certificate to determine whether it will appear in the certificate selection dialog box that is displayed by the CertSelectCertificate function. PFNCMFILTERPROC is an application-defined callback function that is specified in the CERT_SELECT_STRUCT structure. The CERT_SELECT_STRUCT structure is a parameter in the CertSelectCertificate function. The PFNCMFILTERPROC function must be implemented by the developer to suit each application.

Syntax

PFNCMFILTERPROC Pfncmfilterproc;

BOOL Pfncmfilterproc(
  PCCERT_CONTEXT pCertContext,
  LPARAM unnamedParam2,
  DWORD unnamedParam3,
  DWORD unnamedParam4
)
{...}

Parameters

pCertContext

A pointer to a CERT_CONTEXT structure that contains a certificate on which to make a filtering determination.

unnamedParam2

dwDisplayWell. Reserved for future use.

unnamedParam3

This DWORD parameter is dwFlags.

unnamedParam4

This DWORD parameter is lCustData. It is the address of an array of byte values that holds custom data. lCustData is passed to the PFNCMFILTERPROC function by the CertSelectCertificate function.

Return value

Return a nonzero value (TRUE) to display the certificate. Return zero (FALSE) to not display the certificate.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header cryptdlg.h

See also

CERT_SELECT_STRUCT

CertSelectCertificate