Compartilhar via


SCardLocateCards

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/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
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

SCardCancel
SCardEstablishContext
SCardGetStatusChange
SCARD_READERSTATE