Share via


CardDestroyDHAgreement function

The CardDestroyDHAgreement function removes an agreed secret from the card. For RSA-only card minidrivers, this entry point is not defined and is set to NULL in the CARD_DATA structure that was returned from CardAcquireContext.

Syntax

DWORD WINAPI CardDestroyDHAgreement(
  _In_ PCARD_DATA pCardData,
  _In_ BYTE       bSecretAgreementIndex,
  _In_ DWORD      dwFlags
);

Parameters

  • pCardData [in]
    Context information for the call. For more information, see CardAcquireContext.

  • bSecretAgreementIndex [in]
    The index of the agreement to destroy.

  • dwFlags [in]
    Reserved. Set to 0.

Return value

Zero on success; otherwise, nonzero.

Remarks

SCARD_E_INVALID_PARAMETER should be returned if bSecretAgreementIndex does not contain a valid agreement.

SCARD_E_INVALID_PARAMETER should be returned when a nonzero dwFlags parameter is passed.

SCARD_W_SECURITY_VIOLATION should be returned if CardDestroyDHAgreement is called without authenticating to the card first.

Requirements

Target platform

Desktop

Header

Cardmod.h (include Cardmod.h)

 

 

Send comments about this topic to Microsoft