SCardTransmit returns RPC_X_BAD_STUB_DATA error (0x6f7) on vista



The issue is on vista.

we have a smart card service running on vista. Service makes a connection
with smart card (via scardconnect) when smart card is inserted.

On vista , smart card based logon is performed (by inserting smart card and
pressing the ctrl+atl+del and entering the smart card pin). BaseCSP is used
for smart card based logon. This is time when our service makes a connection
with smart card.

logoff current user.

again perform smart card winlogon. (make sure the card is not removed in
between first and second winlogon).

Now if service is sending any APDU, scardtransmit returns
RPC_X_BAD_STUB_DATA code.

If we lock and unlock the machine (without doing switch user), scardtransmit
works fine.

Amit Goel
Senior Developer
SafeNet Inc.
.