The SCardGetStatusChange function blocks execution until the current availability of the cards in a specific set of readers changes.
The caller supplies a list of readers to be monitored via an SCARD_READERSTATE array and the maximum amount of time (in seconds) that it is willing to wait for an action to occur on one of the listed readers. The function returns when there is a change in availability, having filled in the dwEventState members of the rgReaderStates parameter appropriately.
LONG SCardGetStatusChange(
IN SCARDCONTEXT hContext,
IN DWORD dwTimeout,
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). |
SCardGetStatusChange 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, SCardLocateCards, SCARD_READERSTATE