CardGetContainerInfo Function

The CardGetContainerInfo function, defined by a smart card module, retrieves a CONTAINER_INFO structure that contains information about a key container on a smart card.


DWORD WINAPI CardGetContainerInfo(
  __in     PCARD_DATA pCardData,
  __in     BYTE bContainerIndex,
  __in     DWORD dwFlags,
  __inout  PCONTAINER_INFO pContainerInfo


  • pCardData [in]
    A pointer to a CARD_DATA structure received from a call to the CardAcquireContext function.

  • bContainerIndex [in]
    A BYTE value that specifies the index number for the key container for which to get information. 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.

  • dwFlags [in]
    Reserved. This parameter must be set to zero.

  • pContainerInfo [in, out]
    A CONTAINER_INFO structure that, on output, contains information about the key container specified by the bContainerIndex parameter.

Return Value

If the function succeeds, the function 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.


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





Send comments about this topic to Microsoft

Build date: 3/5/2009