| Previous | Next |
| SCARD_E_READER_UNAVAILABLE | SCARD_E_PCI_TOO_SMALL |
SCARD_P_SHUTDOWN
A shutdown signal, not a card diagnosis
SCARD_P_SHUTDOWN reports that an operation was aborted so that the PC/SC server side could exit. It is a lifecycle condition: the operation may have been waiting for a reader event or communicating with a card when the Smart Card Resource Manager began stopping. It does not establish that the reader, card, PIN, or application data is defective.
The correct response is to release handles associated with the old resource-manager context and establish a new context only after the service is available again. Reusing a handle that belonged to a context being shut down can turn a controlled shutdown into a sequence of misleading handle, reset, or communication errors.
How to handle it
- Treat it as a terminal result for the current operation; cancel pending work cleanly and notify higher layers that the service lifecycle changed.
- Log the service state and process shutdown events near the failure time.
- On restart, enumerate readers again rather than assuming a previously cached reader name and card state are still valid.
References
Looking for a different code? Search another status or error code.