다음을 통해 공유


CspGetDHAgreement callback function

This topic is not current. For the most current information about the Smart Card API, see Smart Card Minidriver Specification.

The CspGetDHAgreement function is a callback function that is set by a caller before calling the CardAcquireContext function. If the CARD_DERIVE_KEY structure used for a call to CardDeriveKey specifies a parameter of the type KDF_NCRYPT_SECRET_HANDLE, the smart card module calls this function to get the handle on the smart card.

Syntax

DWORD WINAPI CspGetDHAgreement(
  _In_  PCARD_DATA pCardData,
  _In_  PVOID      hSecretAgreement,
  _Out_ BYTE       *pbSecretAgreementIndex,
  _In_  DWORD      dwFlags
);

Parameters

pCardData [in]

A pointer to a CARD_DATA structure received from a call to the CardAcquireContext function.

hSecretAgreement [in]

A pointer to the BCryptBuffer structure that specifies the KDF_NCRYPT_SECRET_HANDLE parameter used in the call to CardDeriveKey.

pbSecretAgreementIndex [out]

On output, specifies the index of the key container on the smart card that contains the secret handle.

dwFlags [in]

Reserved. This parameter must be set to zero.

Return value

If the function succeeds, the function returns zero.

If the function fails, it returns a nonzero value.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Cardmod.h