Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function gives you direct control of the reader. You can call it any time after a successful call to SCardConnectand before a successful call to SCardDisconnect. The effect on the state of the reader depends on the control code.
Syntax
LONG SCardControl( SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned ); |
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 dwControlCodeparameter 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 dwControlCodeparameter 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 DWORDthat receives the size, in bytes, of the data stored into the buffer pointed to by lpOutBuffer.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
SCARD_S_SUCCESS |
Succeeds |
An error value (see Smart Card Error Valuesfor a list of all error values). |
Fails |
Remarks
SCardControlis a direct card access 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 |