#include <PCSC/ifdhandler.h>
RESPONSECODE IFDHControl(DWORD Lun,
DWORD dwControlCode,
PUCHAR TxBuffer,
DWORD TxLength,
PUCHAR RxBuffer,
DWORD RxLength,
PDWORD pdwBytesReturned);
| Lun | IN | Logical Unit Number |
| dwControlCode | IN | Control code for the operation |
| TxBuffer | IN | Bytes to be sent |
| TxLength | IN | Length of sent bytes |
| RxBuffer | OUT | Response |
| RxLength | IN | Length of response buffer |
| pdwBytesReturned | OUT | Length of response |
This function performs a data exchange with the reader (not the card) specified by Lun. It is responsible for abstracting functionality such as PIN pads, biometrics, LCD panels, etc. You should follow the MCT and CTBCS specifications for a list of accepted commands to implement. This function is fully voluntary and does not have to be implemented unless you want extended functionality.
This value identifies the specific operation to be performed. This value is driver specific.
This function will be passed the length of the buffer RxBuffer in RxLength and it must set the length of the received data in pdwBytesReturned.
Notes:
*pdwBytesReturned should be set to zero on error.
| IFD_SUCCESS | Success |
| IFD_COMMUNICATION_ERROR | An error has occurred |
| IFD_RESPONSE_TIMEOUT | The response timed out |
| IFD_NO_SUCH_DEVICE | The reader is no more present |
Ludovic Rousseau 2008-01-18