| Previous | Next |
| SCARD_W_UNPOWERED_CARD | SCARD_W_REMOVED_CARD |
SCARD_W_RESET_CARD
A reset invalidates shared state
SCARD_W_RESET_CARD means that the card was reset while the application still held a connection. It often appears in shared-reader scenarios when another process resets the card, or after a transaction is held idle long enough for the resource manager to reset it. The code is a warning because recovery is possible, but it must not be ignored.
After a reset, anything tied to the old card session may be gone: selected applications, security environment, PIN verification state, secure messaging state, and any protocol assumptions. PCSC-lite explicitly documents that an application receiving this status must call SCardReconnect so that its connection can acknowledge the reset and return to a valid state.
Correct recovery
- Reconnect and obtain the active protocol again; do not keep using the old transaction state.
- Reselect the needed application and repeat only the authentication steps required for the new session.
- Review concurrency: keep transactions short and avoid independent components resetting a card that another component is using.
References
- Microsoft: SCardReconnect
- PCSC-lite: SCardReconnect behavior
- Microsoft: SCardBeginTransaction
- PCSC-lite: error codes
Looking for a different code? Search another status or error code.