The SCardControl function gives you direct control of the reader. You can call it any time after a successful call to SCardConnect and before a successful call to SCardDisconnect. The effect on the state of the reader depends on the control code.
LONG SCardControl(
IN SCARDHANDLE hCard,
IN DWORD dwControlCode,
IN LPCVOID lpInBuffer,
IN DWORD nInBufferSize,
OUT LPVOID lpOutBuffer,
IN DWORD nOutBufferSize,
OUT LPDWORD lpBytesReturned
);
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). |
SCardControl is a direct card access function. For a description of other direct access functions, see Direct Card Access 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.