PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_RELEASE callback function (wincrypt.h)

The PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_RELEASE callback function releases the provider.

Syntax

PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_RELEASE PfnCryptObjectLocatorProviderRelease;

void PfnCryptObjectLocatorProviderRelease(
  [in]           DWORD dwReason,
  [in, optional] LPVOID pPluginContext
)
{...}

Parameters

[in] dwReason

Specifies the reason the provider is being released. This can be one of the following values:

Value Meaning
CRYPT_OBJECT_LOCATOR_RELEASE_SYSTEM_SHUTDOWN
1
The computer is shutting down.
CRYPT_OBJECT_LOCATOR_RELEASE_SERVICE_STOP
2
The service is stopping.
CRYPT_OBJECT_LOCATOR_RELEASE_PROCESS_EXIT
3
The calling process is ending.
CRYPT_OBJECT_LOCATOR_RELEASE_DLL_UNLOAD
4
The provider DLL is unloading.

[in, optional] pPluginContext

Pointer to an optional buffer defined by this provider and returned by the PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_INITIALIZE function. The buffer is not modified by the caller. Your provider can use the data to help it determine what actions to perform or to maintain additional information.

Return value

None

Remarks

The PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_RELEASE callback function is currently called by only the Secure Channel (Schannel) security package. This function is called once for every call made to PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_INITIALIZE.

The provider is not expected to release all memory for all objects but should clean itself if the dwReason parameter is set to CRYPT_OBJECT_LOCATOR_RELEASE_SERVICE_STOP or CRYPT_OBJECT_LOCATOR_RELEASE_DLL_UNLOAD.

This function must block so that calls to PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FLUSH can complete.

Requirements

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

See also

CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE

PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_INITIALIZE