#include <PCSC/ifdhandler.h>
RESPONSECODE IFDHPowerICC(DWORD Lun,
DWORD Action,
PUCHAR Atr,
PDWORD AtrLength);
| Lun | IN | Logical Unit Number |
| Action | IN | Action to be taken |
| Atr | OUT | Answer to Reset (ATR) value of the inserted card |
| AtrLength | INOUT | Length of the ATR |
This function controls the power and reset signals of the smart card reader at the particular reader/slot specified by Lun.
Power up the card (store and return Atr and AtrLength)
Power down the card (Atr and AtrLength should be zeroed)
Perform a warm reset of the card (no power down). If the card is not powered then power up the card (store and return Atr and AtrLength)
The driver is responsible for caching this value in case IFDHGetCapabilities() is called requesting the ATR and its length. The ATR length should not exceed MAX_ATR_SIZE.
This should not exceed MAX_ATR_SIZE.
Notes:
Memory cards without an ATR should return IFD_SUCCESS on reset but the Atr should be zeroed and the length should be zero Reset errors should return zero for the AtrLength and return IFD_ERROR_POWER_ACTION.
| IFD_SUCCESS | Success |
| IFD_ERROR_POWER_ACTION | Error powering/resetting card |
| IFD_COMMUNICATION_ERROR | An error has occurred |
| IFD_NOT_SUPPORTED | Action not supported |
| IFD_NO_SUCH_DEVICE | The reader is no more present |
Ludovic Rousseau 2008-01-18