Welcome to MSDN Blogs Sign in | Join | Help

Decrypt my World

Cryptography, Security, Debugging and more!

News

  • Any of my posts is supported under any Microsoft standard support program or service. They are provided "AS IS" without warranty of any kind, and confer no rights.

Where are my readers?

Locations of visitors to this page

Favorite Posts

SCardGetStatusChange fails with SCARD_E_NO_SERVICE error

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)

Posted: Monday, December 17, 2007 9:41 AM by alejacma
Filed under: ,

Comments

Marek Pawlak said:

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

Marek

# February 27, 2009 8:11 AM

Håkan Eriksson said:

Thanx, worked fine for me as well.

/Håkan

# March 9, 2009 12:08 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker