Compartilhar via


SCardGetStatusChange

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This 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 through an SCARD_READERSTATE structure 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 SCARD_READERSTATE structures appropriately.

Syntax

LONG SCardGetStatusChange(
  SCARDCONTEXT hContext, 
  DWORD dwTimeout, 
  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.
  • dwTimeout
    [in] Specifies the maximum amount of time, in milliseconds, to wait for an action. A value of zero causes the function to return immediately. A value of INFINITE causes this function never to time out.
  • rgReaderStates
    [in, out] Supplies an array of SCARD_READERSTATE structures that specify the readers to watch, and receives the result.
  • cReaders
    [in] Supplies the number 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

SCardGetStatusChange 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
SCardLocateCards
SCARD_READERSTATE