PCRYPT_RESOLVE_HCRYPTPROV_FUNC callback function (wincrypt.h)

[The PCRYPT_RESOLVE_HCRYPTPROV_FUNC function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

The PCRYPT_RESOLVE_HCRYPTPROV_FUNC function returns a handle to a cryptographic service provider (CSP) by using the phCryptProv parameter to receive the key being imported. It is a callback function called from the context of the CryptImportPKCS8 function. The function must be implemented by the developer to suit each application.

Syntax

PCRYPT_RESOLVE_HCRYPTPROV_FUNC PcryptResolveHcryptprovFunc;

BOOL PcryptResolveHcryptprovFunc(
  [in]  CRYPT_PRIVATE_KEY_INFO *pPrivateKeyInfo,
  [out] HCRYPTPROV *phCryptProv,
  [in]  LPVOID pVoidResolveFunc
)
{...}

Parameters

[in] pPrivateKeyInfo

A pointer to a CRYPT_PRIVATE_KEY_INFO structure that describes the key being imported.

[out] phCryptProv

A pointer to the HCRYPTPROV to receive the CSP.

[in] pVoidResolveFunc

The pVoidResolveFunc member passed in by the caller in the CRYPT_PKCS8_IMPORT_PARAMS structure.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE).

Requirements

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

See also

CRYPT_PKCS8_IMPORT_PARAMS

CRYPT_PRIVATE_KEY_INFO

CryptImportPKCS8

HCRYPTPROV