SCardControl

This 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 );

Parameters

  • hCard
    Handle to a reference value returned from SCardConnect.
  • dwControlCode
    Specifies the control code for the operation. This value identifies the specific operation to be performed.
  • lpInBuffer
    Long pointer to a buffer that contains the data required to perform the operation. This parameter can be NULL if the dwControlCode parameter specifies an operation that does not require input data.
  • nInBufferSize
    Integer that specifies the size, in bytes, of the buffer pointed to by lpInBuffer.
  • lpOutBuffer
    Long pointer to a buffer that receives the operation's output data. This parameter can be NULL if the dwControlCode parameter specifies an operation that does not produce output data.
  • nOutBufferSize
    Integer that specifies the size, in bytes, of the buffer pointed to by lpOutBuffer.
  • lpBytesReturned
    Long pointer to a DWORD that receives the size, in bytes, of the data stored into the buffer pointed to by lpOutBuffer.

Return Values

Value Description
Succeeds SCARD_S_SUCCESS
Fails An error value (see Smart Card Error values for a list of all error values)

Remarks

SCardControl is a direct card access function.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later Winscard.h   Winscard.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

SCardConnect, SCardDisconnect

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.