SCardLocateCardsByATR (Windows CE 5.0)
This function searches the readers listed in the rgReaderStates parameter for a card with an ATR string that matches one of the ATRs specified in rgAtrMasks, returning immediately with the result.
LONG SCardLocateCards(SCARDCONTEXThContext,
LPSCARD_ATRMASKrgAtrMasks,
DWORDcAtrs,
LPSCARD_READERSTATErgReaderStates,
DWORDcReaders);
Parameters
- hContext
[in] Supplies the handle that identifies the resource manager context. A previous call to SCardEstablishContext sets the resource manager context. - rgAtrMasks
[in] Array of SCARD_ATRMASK structures that contain theATRs and ATR masks for the cards to search for. - cAtrs
[in] Number of elements in the rgAtrMasks array. - rgReaderStates
[in, out] Supplies an array of SCARD_READERSTATE structures that specify the readers to search, and receives the result. - cReaders
[in] Supplies the number 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
This service is especially useful when used in conjunction with SCardGetStatusChange. If no matching cards are found by means of SCardLocateCards, the calling application may use SCardGetStatusChange to wait for card availability changes.
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Winscard.h.
Link Library: Winscard.lib.
Send Feedback on this topic to the authors