Decrypt my World

Cryptography, Security, Debugging and more!

SCardGetStatusChange fails with SCARD_E_NO_SERVICE error

SCardGetStatusChange fails with SCARD_E_NO_SERVICE error

  • Comments 3

Hi, welcome back,

 

Smart Card Redirection on Microsoft Remote Desktop Protocol (RDP) client 6.0 may cause SCardGetStatusChange to fail with error 0x8010001d - SCARD_E_NO_SERVICE - "The Smart card resource manager is not running.".

 

When a user connects from her machine A (i.e. Windows XP SP2) to a remote machine B (i.e. Windows Vista) using Microsoft RDP client, she can use her smart card inserted in a reader on machine A to perform operations on remote machine B. This is called smart card redirection and is enabled by default.

 

However, from RDP client 6.0 on, there appears to be a problem with applications on machine B which call SCardGetStatusChange() in order to monitor smart card status changes, such as smart card insertions and removals. SCardGetStatusChange API fails with the error shown above. Previous versions of the RDP client did not exhibit this problem.

 

Well, I've seen that this issue happens when some fields of the rgReaderStates structure being passed to SCardGetStatusChange are not being initialized, so they contain invalid values that SCardGetStatusChange tries to use unsuccessfully.

 

 

A piece of advice: clean up the fields of the rgReaderStates structure before calling SCardGetStatusChange, so all unused fields are set to 0.

 

I hope this helps.

Cheers,

 

 

Alex (Alejandro Campos Magencio)

  • Had the same problem. Worked like a dream! Thank you.

    Marek

  • Thanx, worked fine for me as well.

    /Håkan

  • Please suggest the process for 'clean up the fields of the rgReaderStates'

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 3 and 5 and type the answer here:
  • Post
Translate This Page