PFN_CERT_CREATE_CONTEXT_SORT_FUNC callback function (wincrypt.h)

The PFN_CERT_CREATE_CONTEXT_SORT_FUNC callback function is called for each sorted context entry when a context is created. This function pointer is passed in the pfnSort member of the CERT_CREATE_CONTEXT_PARA structure.

Syntax

PFN_CERT_CREATE_CONTEXT_SORT_FUNC PfnCertCreateContextSortFunc;

BOOL PfnCertCreateContextSortFunc(
  [in]      DWORD cbTotalEncoded,
  [in]      DWORD cbRemainEncoded,
  [in]      DWORD cEntry,
  [in, out] void *pvSort
)
{...}

Parameters

[in] cbTotalEncoded

The total number of bytes of the encoded entries.

[in] cbRemainEncoded

The number of bytes remaining to be encoded.

[in] cEntry

The current number of sorted entries.

[in, out] pvSort

An application-defined value that is passed in the pvSort member of the CERT_CREATE_CONTEXT_PARA structure.

Return value

Return TRUE to continue the sort or FALSE to stop the sort. If FALSE is returned, CertCreateContext will fail and set the last error code to ERROR_CANCELLED.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wincrypt.h

See also

CERT_CREATE_CONTEXT_PARA

CertCreateContext