CardDestroyKey function

The CardDestroyKey function releases a temporary key on the card. The card should delete all of the key material that is associated with that key handle.

Syntax


DWORD WINAPI CardDestroyKey(
  _In_ PCARD_DATA      pCardData,
  _In_ CARD_KEY_HANDLE hKey
);

Parameters

pCardData [in]

Context information for the call. For more information, see CardAcquireContext.

hKey [in]

Key handle that is returned by CardImportSessionKey, MDImportSessionKey, or CardGetSharedKeyHandle.

Return value

Zero on success; otherwise, nonzero.

Remarks

This function deletes the key material that is associated with the key handle.

The returned status code should indicate success if the key handle was valid and the key material was successfully deleted.

If CardDestroyKey is called with an invalid key handle, the function should return SCARD_E_INVALID_HANDLE.

If CardDestroyKey cannot delete the key material, the function should return SCARD_E_INVALID_HANDLE.

Requirements

Target platform

Desktop

Header

Cardmod.h (include Cardmod.h)

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft