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(
IN SCARDCONTEXT hContext, 
IN LPCTSTR mszCards, 
IN OUT LPSCARD_READERSTATE rgReaderStates, 
IN DWORD cReaders );

Parameters

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

Return Values

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

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

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later Winscard.h   Winscard.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

SCardCancel, SCardEstablishContext, SCardGetStatusChange, SCARD_READERSTATE

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.