Share via


SCardLocateCards (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

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 Value

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

Header winscard.h
Library winscard.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Smart Card Functions
SCardCancel
SCardEstablishContext
SCardGetStatusChange
SCARD_READERSTATE