CardDeleteContainer function

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

The CardDeleteContainer function, defined by a smart card module, deletes a key container from a smart card.

Syntax

DWORD WINAPI CardDeleteContainer(
  _In_ PCARD_DATA pCardData,
  _In_ BYTE       bContainerIndex,
  _In_ DWORD      dwReserved
);

Parameters

pCardData [in]

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

bContainerIndex [in]

The index number for the key container to delete. The Microsoft Base Smart Card Cryptographic Service Provider (CSP) and smart card key storage provider (KSP) use this index value to identify the key container.

The function fails if the specified key container does not exist.

dwReserved [in]

Reserved. This parameter must be set to zero.

Return value

If the function succeeds, it returns zero.

If the function fails, it returns a nonzero error value or one of the following possible error values.

Return code/value Description
SCARD_E_NO_KEY_CONTAINER
2148532260 (0x80100024)
The value of the bContainerIndex parameter is not a valid index of an existing key container.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Cardmod.h

See also

CARD_DATA

CardAcquireContext

CardCreateContainer