The SCardLocateCards function searches the readers listed in the lpReaderStates parameter for a card with an 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
);
If the function… | The return value is… |
---|---|
Succeeds | SCARD_S_SUCCESS. |
Fails | An error code (see Error Codes for a list of all error codes). |
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. For a description of other tracking functions, see Smart Card Tracking Functions.
Windows NT: Use version 4.0 SP3 and later.
Windows: Use Windows 95 OSR2.1.
Windows CE: Unsupported.
Header: Declared in winscard.h.
Import Library: Link with winscard.lib.
SCardCancel, SCardEstablishContext, SCardGetStatusChange, SCARD_READERSTATE