CardDeleteContainer Function

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 21485322600x80100024

The value of the bContainerIndex parameter is not a valid index of an existing key container.

Requirements

Minimum supported client Windows XP, Windows 2000 Professional with SP4
Minimum supported server Windows Server 2003, Windows 2000 Server with SP4
Header Cardmod.h

See Also

CARD_DATA

CardAcquireContext

CardCreateContainer

Send comments about this topic to Microsoft

Build date: 3/5/2009