What does HRESULT 0x80100008 (SCARD_E_INSUFFICIENT_BUFFER) mean?

 
Previous Next
SCARD_F_WAITED_TOO_LONG SCARD_E_UNKNOWN_READER

SCARD_E_INSUFFICIENT_BUFFER

SCARD_E_INSUFFICIENT_BUFFER The receive buffer supplied to a smart-card API was smaller than the returned data. It is a caller-side buffer-size issue, not proof that the card returned malformed data.

How to avoid it

  • Follow the API's size-query pattern or use SCARD_AUTOALLOCATE only with functions that support it.
  • For SCardTransmit, allocate an explicit receive buffer: Microsoft documents that it does not support SCARD_AUTOALLOCATE.
  • For T=0, reserve room for the mandatory SW1 and SW2 status bytes even when no response payload is expected.

Microsoft: SCardTransmit

Microsoft: SCardListReaders

Microsoft: Smart Card Functions


Looking for a different code? Search another status or error code.