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

89 questions
12
votes
3 answers

MiFare - Difference between UID and Serial Number of MiFare Card

I need to read serial number of MiFare card usin WinSCard. I am able to read 7B UID from the MiFare card. The confusion is that i dont know if the UID and the serial number of MiFare card are same?!! I have googled the issue but only could get…
jparthj
  • 1,482
  • 2
  • 19
  • 43
8
votes
6 answers

Contact-less card through an OmniKey, how to get "UID"?

I am trying to read information off of a smartcard, using a contact-less OmniKey 5321 card reader. Edit: Added a bounty. I'm writing a C# 3 in .NET 3.5 program, so this is a Windows application. The card has some information stamped onto it, that I…
Lasse V. Karlsen
  • 350,178
  • 94
  • 582
  • 779
7
votes
1 answer

Smart card reader development with .Net technologies

Does anyone know how to monitor the presence of smart card and read the UID value of the card? Yes I tried lot of examples in web like A Smart Card Framework for .NET pcsc-sharp Monitoring a Smartcard Reader But No idea how to do it. I can detect…
iJay
  • 3,925
  • 5
  • 31
  • 62
6
votes
2 answers

Getting PCSC reader serial number with WinSCard

I have a problem with getting PCSC reader serial number if card is not present in the reader. I am using winscard.dll and c++. The following code will work only for the case if card is present in the reader. Otherwise the SCardHandle is not…
vellotis
  • 747
  • 1
  • 11
  • 25
6
votes
2 answers

Establish resource manager context to use smart card reader

I'm developing a c++ application, using Visual Studio 2017. I'm using the windows library winscard. I'm starting with a simple project where i'm calling the function SCardEstablishContext as the first step needed to read a smart card. The snippet…
S.Orioli
  • 433
  • 4
  • 20
4
votes
2 answers

How To Use Extended APDU With Windows SmartCard Framework

I am using WinSCard to read an ISO 7816 compliant smart card (to be specific, it's a PIV card). The card has a picture on it that is roughly 12 KB. Right now, I connect in T=1 mode and use the SCardTransmit function to send my GET DATA APDU command…
Ben
  • 439
  • 8
  • 15
4
votes
1 answer

Determine Facility Code and Card Number from ATR in C#

I have the following card reader HID Omnikey 5325. I have a contact-less card named HIS Proximity. The number written on this card is 133593 42101044091-3. By reading the card, I get the following ATR hex: 3B050002F10673 Using the folowing…
Dragos Durlut
  • 7,558
  • 10
  • 42
  • 57
4
votes
0 answers

SCardGetStatusChange First-chance exception

I'm using following code in a thread: SCardGetStatusChange(hContext, timeout, rgReaderStates_t, nbReaders); where: SCARDCONTEXT hContext; DWORD timeout; SCARD_READERSTATE *rgReaderStates_t = NULL; DWORD nbReaders; Everything works correctly,…
mav
  • 129
  • 3
  • 10
4
votes
2 answers

How to find the device instance id of a PCSC reader

Having only a handle and context to a PCSC reader using winscard on Windows >= XP, is there some way to get its device instance id or something else that can be used in the SetupDi* API to find out which driver is loaded for said…
mandrake
  • 1,091
  • 1
  • 10
  • 27
4
votes
0 answers

How to connect to Smart Card Reader based on its USB port location?

I'm currently doing some research and testing on multiple smart card reader identification to determine which reader is connected to which USB port. Lets say that I plug in Reader A into USB port 1. By invoking SCardListReaders function, I retrieve…
4
votes
1 answer

How are PCSC smart card reader 'friendly names' constructed?

I use WinSCard to list all readers, which gives me a list like this: ASK RDR4x7 0 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 0 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 1 SCM Microsystems Inc. SCR3320 USB Smart Card Reader…
Vincent Van Den Berghe
  • 5,165
  • 2
  • 29
  • 38
3
votes
2 answers

.NET or COM HID iCLASS Smart Card Reader

I have coding I almost always use with my Omnikey RFID CardMan 5321 smart cards. Problem is we received new cards today which are marked "HID iCLASS GL" which do not appear to be working well with our coding. Without going through the whole…
Anthony Greco
  • 2,745
  • 4
  • 23
  • 38
3
votes
1 answer

NFC MIFARE Classic 1K cannot read or write

I've a NFC reader along with MIFARE Classic 1K card. I've a Visual C# winforms project. Right now I'm able to connect to the reader and detect the card and get it's UUID. The problem I'm facing is while writing and reading data. I searched a lot on…
Ibrahim Iqbal
  • 590
  • 3
  • 21
3
votes
2 answers

C# WinScard.SCardListReaders should list only the connected readers (but it is listing all the past installed reader names which is now not connected)

Please go through my below C# code. I am trying to get the list of Smart Card readers that are now connected to my computer. But this function is returning all the smartcard reader names that was connected in the past (I mean not connected now). I…
3
votes
1 answer

ACR1252 NFC Reader Serial Number

I bought a couple of ACR1252 NFC readers, as they seem to be the only ones that can store and return an internal serial number. I need them for a C# program, where I need to distinguish 2 NFC readers plugged to the same computer, since Windows…
Aritz V.
  • 33
  • 4
1
2 3 4 5 6