Questions tagged [winscard]

Smart Card Resource Manager Helper Library, implementing the Personal Computer/Smart Card API in Microsoft Windows 2000 and later.

Winscard is the name of the header file for the Smart Card Resource Manager Helper Library, implementing the Personal Computer/Smart Card API in recent versions of the Microsoft Windows operating system (Windows 2000 and later).

Also see

92 questions
1
vote
1 answer

use of ScardConnect function (winscard.dll) in Wcf

I am trying Connecting to smartcard with using connect function of winscard.dll in my WCF project. Wcf service, is publishing with remote machine which machine is installed on windows server 8.1 ScardConnect function is returning value of 6. public…
TheDebugger
  • 149
  • 2
  • 9
1
vote
1 answer

Contactless 'Reset' Failure

My application is working properly in all aspects apart from when I wish to remove contactless card 'A', and replace it with contactless card 'B'. Once card B is present, I run the following PCSC functions: lResult = PCSC.SCardDisconnect(hCard,…
1
vote
4 answers

How to read user data on smart card?

First off, I'm still relatively new working with smart cards and I don't know exactly how is data stored and which data is protected on a smart card. I'm trying to read my student identification smart card which is PIN protected. I've been…
kreso
  • 11
  • 1
  • 4
1
vote
2 answers

WinScard SCardConnect returns SCARD_E_NOT_READY

I have a program in Java that successfully communicates with a Java Smart Card with a smart card reader using javax.smartcardio.*. With API monitor I have found out that the java.exe witch runs it is actually using WinSCard winAPI (It loads…
FPGA warrior
  • 241
  • 3
  • 11
1
vote
3 answers

C# SCardControl return code 1

This is my first attempt in using a card reader in C#, or basically anywhere. I use ACS ACR122U PICC Interface 0 reader in Windows 7 64bit. My first problem occurs when I tried to connect to the reader using ModWinsCard.SCardConnect(hContext,…
Samuel Adam
  • 1,327
  • 4
  • 26
  • 45
1
vote
2 answers

ISO 15693: read multiple security blocks

I am trying to modify an existing SCardTransmit() command (C#) that currently reads one security status/block from a ISO 15693 vicinity RFID card (TI Tag-it HF), to one that will retrieve the security status for all 64 blocks on the card. The…
mikem419
  • 61
  • 1
  • 7
1
vote
0 answers

JNA and Winscard: Reading attributes (SCardGetAttrib) without card

I have problems to read out reader attributes (like SCARD_ATTR_VENDOR_IFD_SERIAL_NO), without a card present on the reader though setting the parameter dwShareMode of the function SCardConnect to SCARD_SHARE_DIRECT. What is going wrong? This is the…
alex
  • 143
  • 2
  • 15
1
vote
1 answer

Getting smart card serial number SCardGetAttrib returns error 50

I am using ACS-ACR88 smart card reader. I am trying to read Smart Card serial number using SCardGetAttrib function in Winscard.dll, but it always returns error 50. 50 is not defined at Smart Card Return Values. Error 50 is 0x32, and it could be…
SVI
  • 921
  • 4
  • 11
  • 23
1
vote
0 answers

Catching arrival of new smartcard reader in Citrix terminal session

According to MSDN there is special virtual reader \?PNP?\Notification that allows get notification of arrival of new smartcard reader (via SCardGetStatusChange function). My code look like (error handling and checks are omitted): while (true) { …
Xi-Tauw
  • 33
  • 3
1
vote
1 answer

SCardGetCardTypeProviderName return empty results

I'm trying to use the SCardGetCardTypeProviderName using interop in C#. One of the parameters is a reference, that is supposed to return the name of the provider for a smart card according to the card context that is passed in. This is the code…
Random
  • 1,896
  • 3
  • 21
  • 33
1
vote
1 answer

python script accessing winscard.dll

Hi all i am writing a python script to access the winscard.dll of windows. lib = cdll.LoadLibrary('winscard.dll') hSC = c_long(0) lRetval = lib.SCardEstablishContext(0,None,None,pointer(hSC)) the above returns a value error as below Traceback…
Britto
  • 501
  • 1
  • 9
  • 22
1
vote
1 answer

Pass APDU command with WINSCARD

below is the function from the winscard API [DllImport("winscard.dll")] public static extern int SCardTransmit ( int hCard, ref SCARD_IO_REQUEST…
Hillary Namanya
  • 93
  • 4
  • 13
1
vote
1 answer

Reader MaxIFSD attribute from smartcard reader

I am trying to find a method to read IFD (Interface Device - Serial Number) attributes from a reader when a card is NOT present. The SCard API seems to have this requirement that all attributes can only be read through a card handle. While this…
1
vote
2 answers

How to handle optional struct parameters when calling C functions from C#

How can i skip the optional parameter (pioRecvPci) in C#? I think the main problem is that in C the parameter is a pointer so it is possible to supply NULL while in C# the ref keyword on a struct is used which can't be null by definition. C…
mibollma
  • 14,959
  • 6
  • 52
  • 69
1
vote
1 answer

Where can I find winscard.lib for PC/SC programming in VC++ 2010 (Win seven)?

I want to write a PC/SC application using VC++ 2010 in win7 x32 environment. My program fails to compile with some linking error like this: error LNK2019: unresolved external symbol _SCardReleaseContext@4 referenced in function "void __cdecl…
Ehsan Khodarahmi
  • 4,772
  • 10
  • 60
  • 87