Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, July 12, 2007 2:00 AM
Hi,
I have a working PC/SC Application for XP but doesnt work for Vista.
- I plugged in the reader.
- I called the API SCardListReaders() but returns an empty reader list.
I am not sure if..
- there is a link failure between the Driver and the Smart Card Resource Manager
or
- The PC/SC Application needs to be recompiled for Vista.
In the end, is there a new Smart Card Library for Vista?
All replies (18)
Saturday, September 29, 2007 8:51 PM ✅Answered
Also, make sure your smart card service is running on Vista
Friday, December 14, 2007 10:30 AM ✅Answered
I found the reason of the problem. I used bulltlp3 sample from DDK. This sample contains the next code in the AddDevice function:
SmartcardExtension->ReaderCapabilities.CurrentState = SCARD_UNKNOWN;
Because my reader is USB reader I removed all serial port functionality where this sate is installed to SCARD_ABSENT or SCARD_PRESENT. It was the reason why reader driver was registred in registry, but was inactive. As I see Smart Card Resource Manager checks this state and it has to be at least SCARD_ABSENT.
Thursday, July 12, 2007 6:40 PM
It looks like this is also in Vista so I suspect it's a driver issue.
Friday, July 13, 2007 6:13 AM
Initially, I suspected it might be the driver too.
I managed to install the driver and could see the smart card reader listed on the Device Manager (PnP Manager). But when I ran the PC/SC app, SCardListsReaders() was empty with the return error code as 0x8010002E (No smart card readers are currently available). I suspected my driver could have failed linking to the Smart Card Resource Manager. (smclib.sys)
Then, I plugged in a TDK-based reader with CCID support. The OS detected the reader as a CCID reader and installed the system supplied CCID driver. This CCID Driver (usbccid.sys) is provided by Microsoft. When I ran the PC/SC application, I had the same error too - 0x8010200E.
I've checked on the Vista system, the Smart Card Service is started.
So..
1. Besides the Smart Card Service, are there any additional service we need to run ?
2. Do we need to recompile the PC/SC application for Vista - any new library / API function calls ?
Friday, July 13, 2007 7:46 PM
Can you show me a code fragment of the actual call you are making? Are the card readers installed? Are you calling it with Null context? What's your elevation level?
Monday, July 16, 2007 7:54 AM
Hi Bruce,I am D-Sky's colleague. Here's the code fragment for SCardListReaders().
SCARDCONTEXT hContext;
CHAR mchReaders[1024];
DWORD cchReaders = 1024;
// Establish context to the Resource Manager
status = SCardEstablishContext(
SCARD_SCOPE_USER,
NULL,
NULL,
&hContext);
if(status != SCARD_S_SUCCESS) {
ShowError(status);
return -1;
}
// List available readers
status = SCardListReaders(
hContext,
NULL,
mchReaders,
&cchReaders);
if(status != SCARD_S_SUCCESS) {
ShowError(status); // It failed here with Error 0x8010002E
return -1;
}
Wednesday, July 18, 2007 5:58 PM
hi
I have the same problem but the error it's situated to the SCardEtablishContext(..,..,..,..)
The funtion returns 6 .
I cant etablish the communication with my reader (SC-Master Phoenix).
SCARDCONTEXT hContext=NULL;
DWORD dwReaders;
SCARDHANDLE hCardHandle=NULL;
LPCTSTR lpmszReaderGroups= NULL;
DWORD dwReaderLen=0;
DWORD dwState;
DWORD dwProtocol;
//Etablissement du context
lReturn=SCardEstablishContext(SCARD_SCOPE_SYSTEM,NULL,NULL,&hContext);
cout<<" lReturn "<<lReturn<<endl;
if(lReturn!=SCARD_S_SUCCESS)
cout<<"Impossible d'avoir les ressource !!!"<<endl;
Tuesday, September 25, 2007 11:15 PM
Let's recap:
1. SCardListReaders is supported on Vista
2. No readers are found
3. Your's isn't the only program that's failing, since by statement above the SC program that came with the programmer failed.
Then we have to ask the following:
Is this device truely a USB CCID-compliant Device?
Does it need an hardware update?
Is it definately correctly installed? (physically?)
Also, I'm still curious if running as a admin would make a difference or no.
for reference:
http://msdn2.microsoft.com/en-us/library/aa379793.aspx
If you continue to have issues then we can create a case for you if you are a partner.
Sunday, November 18, 2007 11:03 AM
I have the same problem with some readers SMC (Contact and contactless), Xiring XiPass, VASCO DP850 and Oberthur OCR 150. The smart card service is correctly started and there is no error event reportes. Perhaps the problem is due to Unicode/Non unicode dll version or program. Any other idea ?
Perhaps have you solved the problem.
Tuesday, November 27, 2007 2:50 PM
SCardEstablishContext returns error 6 - the reason can be in Smart Card Service. By default it runs manually. You should run it.
SCardListReaders doesn't return the list of readers because smart card reader driver was not installed correctly. Driver has to add some info into registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\Readers. Just from this place Resource Manager takes the list of readers. This works for WinXP, but I suppose the same for WinVista.
Wednesday, November 28, 2007 12:23 PM
Yes, the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\Readers is empty. That is not normal because the Gemplus PinPad USB I use has been installed with windows update. The driver is VISTA compatible and is visible in the Device management window. When I disconnect the reader, the line disapears in the devices list. When I click on the properties button, Windows answers that the driver is working correctly.
I am surprised especially because this happens with 3 or 4 different readers from different constructors.
For my case, the SCardEstablishContext function returns 0, the SCardListReaderGroups returns 0 with an empty string and SCardListReaders returns 0x8010002e.
When I try to debug the program with Visual Studio2008, when the SCardEstablishContext is called the following message is displayed on stdout :
First-chance exception at 0x76b6b09e in ListReaders.exe: 0x000006BA: Le serveur RPC n'est pas disponible.
meaning that the RPC server is not available. Yet the RPC service is running !
and when the SCardListReaders function is called :
First-chance exception at 0x76b6b09e in ListReaders.exe: Microsoft C++ exception: unsigned long at memory location 0x0025fa38..
First-chance exception at 0x76b6b09e in ListReaders.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
I have the same result on VISTA Premium and on VISTA enterprise.
Perhaps I must wait the SPn+1
Wednesday, November 28, 2007 2:59 PM
Friends, I found out that HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\Readers can be empty after driver instalation. You can add info to this registry key by SCardIntroduceReader function. But it does not help. SCardListReaders started to work only when I had changed key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\Current = 1 manually. I could give the list of introduced readers, but I cannot use the reader.
I develop a USB PCSC driver and still cannot understand how to install it in the system correctly and how to connect it with Smart Card Resource Manager. Could somebody help me?
Thursday, November 29, 2007 3:25 PM
You have some information in the following document : http://download.microsoft.com/download/f/4/f/f4f3c957-057c-4acb-b10c-bb6087045025/WSCFDepl.doc
Normaly the driver installation creates the registry key and without additional operation, the smartCard reader must be operational. That is true on Windows NT, 2000 and XP. It seams be false on VISTA.
Friday, December 28, 2007 10:27 AM | 1 vote
The truth comes from Belgique : I have found on a forum which give the solution :
http://www.isabel.be/support/fr/forum/viewtopic.php?t=129
The problem is in the registry permission for LOCAL_SERVICE :
I've had the same problem before after an upgrade from Windows 2000 to Windows xp.
To solve it, I had to correct the permissions on the registry key HKLM\SOFTWARE\Microsoft\Cryptography\Calais.
- Right-click on the key HKLM\SOFTWARE\Microsoft\Cryptography\Calais and select Permissions...
- Click Add.
- Click Advanced.
- Click Locations.
- Click on the computername and click OK.
- In the window 'Select user or groups', click on Find now.
- Select LOCAL SERVICE.
- Click OK.
- In the window 'Select user or groups', click on OK.
- In the window 'Permissions for Calais', click on LOCAL SERVICE and make sure 'Full control' , 'Read' and 'special permissions' is allowed.
- In the window 'Advance Security Settings for Calais", deactivate the options 'Inherit from parent the permission entries that apply to child objects...'
- When the window 'Security' appears, click Copy.
- In the window 'Advance Security Settings for Calais", activate the option 'Replace permission entries on all child objects with entries shown here that apply to child objects' and click OK.
- In the window 'Security' click Yes
- In the window 'Permissions for Calais', click OK.
I don't now why the registry permissions have been reseted. But it seams to be a solution of the problem. I hope that Microsoft can give us a patch and an explanation of this fact !
Wednesday, February 20, 2008 3:32 PM
Hi FroggyCdc,
I had the same problem on Windows Vista (Enterprise). One day, all of my test smart card readers stopped working while a couple of weeks before, everything was fine. All of them were PC/SC (and coincidentally all were SCM brand). the problem lied in the call to SCardListReaders, which always gave the result SCARD_E_NO_READERS_AVAILABLE (0x8010002E). Strange, because the smart card readers in question were clearly visible in the device manager.
Your suggestion (although I'm normally strongly against editing such things in the registry) worked for me, after restarting the Smart Card service via the Services console.
The only reason I can think of right now is that a couple of weeks ago, I was playing around with an ACS smart card reader (the cheap blue one) and couldn't get it to work. I updated and downgraded the drivers for that particular reader a couple of times, and also installed one of their driver packs from the website.
Anyway, thanks a lot for the solution, I was afraid I was going to have to reinstall my machine.
kind regards,
Stephane
Thursday, February 28, 2008 5:46 AM
Hi
I have followed the steps as per stated in your post.
But for me its not working. My problem iis that, I m using
Smart card API from WinSCard.dll in my C# .Net Application.
My applications getects Smart Card for first two times and
then it does not detect. My application works fine in Xp without
any problem. Can u please help me in this concern.
Thank you
Jack
Friday, April 22, 2011 2:37 PM
Hai Every body,
I want to read the information (ICCID,IMSI..) from SIMCARD by OMNIKEY 3121, Any one to help me pls give me an answer if you can pls send a solution to my email ID [email protected]....... Its very urgent it will be very thankfull
Thanks in Advance.....
Thursday, March 24, 2016 6:36 AM
Hi FroggyCdc,
I had exactly the same problem as stombeur, and your solution worked for my situation too. Though I do not want to edit permissions in the registry, just like stombeur, but thank u soooooooo much for the solution.