SCardControl (Windows CE 5.0)

Send Feedback

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(SCARDHANDLEhCard, DWORDdwControlCode, LPCVOIDlpInBuffer, DWORDnInBufferSize, LPVOIDlpOutBuffer, DWORDnOutBufferSize, LPDWORDlpBytesReturned);

Parameters

  • hCard
    [in] Handle to a reference value returned from SCardConnect.
  • dwControlCode
    [in] Specifies the control code for the operation. This value identifies the specific operation to be performed.
  • lpInBuffer
    [in] 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
    [in] Integer that specifies the size, in bytes, of the buffer pointed to by lpInBuffer.
  • lpOutBuffer
    [out] 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
    [in] Integer that specifies the size, in bytes, of the buffer pointed to by lpOutBuffer.
  • lpBytesReturned
    [out] Long pointer to a DWORD that receives the size, in bytes, of the data stored into the buffer pointed to by lpOutBuffer.

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

SCardControl is a direct card access function.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Winscard.h.
Link Library: Winscard.lib.

See Also

SCardConnect | SCardDisconnect

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.