Partager via


SCardLocateCards

This function searches the readers listed in the rgReaderStates parameter for a card with an Automatic Terminal Recognition (ATR) string that matches one of the card names specified in mszCards, returning immediately with the result.

LONG SCardLocateCards(
  SCARDCONTEXT hContext, 
  LPCTSTR mszCards, 
  LPSCARD_READERSTATE rgReaderStates, 
  DWORD cReaders 
);

Parameters

  • hContext
    [in] Handle to the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext.
  • mszCards
    [in] Supplies a multi-string that contains the names of the cards to search for.
  • rgReaderStates
    [in, out] Supplies an array of SCARD_READERSTATE structures that specify the readers to search, and receives the result.
  • cReaders
    [in] Count of elements in the rgReaderStates array.

Return Values

The following table shows the possible return values.

Value Description
SCARD_S_SUCCESS Succeeds
An error value (see Smart Card Error Values for a list of all error values). Fails

Remarks

If no matching cards are found, the calling application may use SCardGetStatusChange to wait for card availability changes.

SCardLocateCards is a smart card tracking function.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Winscard.h.
Link Library: Winscard.lib.

See Also

SCardCancel | SCardEstablishContext | SCardGetStatusChange | SCARD_READERSTATE

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.