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
16
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,606
  • 3
  • 20
  • 44
9
votes
7 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
  • 380,855
  • 102
  • 628
  • 825
7
votes
2 answers

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
  • 4,205
  • 5
  • 35
  • 63
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
  • 829
  • 1
  • 12
  • 26
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
  • 443
  • 6
  • 21
5
votes
1 answer

SCardEstablishContext memory leak

We suddenly have problems with the smart card api on some windows installations. There seem to be a memory leak while calling the SCardEstablishContext function. The problem can be reproduced in a console application with the code sample available…
5
votes
2 answers

How to read/write synchronous only smart cards like memory cards

I have a IC memory cards that support only Synchronous Interface (like SLE5532,SLE5542...etc) I would like to know how to write an application that read memory contents, verify PSC (PIN) and write the memory. This type of cards cannot accept normal…
5
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
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
  • 449
  • 8
  • 15
4
votes
2 answers

How To Detect Smart Card Reader Interface Characteristic

I am using winscard.dll within my Dotnet smart card application. My reader, an Omnikey 5321 has both a contact and a contactless interface, which are detected as two different readers. The contactless has the letters "CL" within it's name. I have no…
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
  • 8,018
  • 10
  • 47
  • 62
4
votes
1 answer

Cannot authenticate NTAG213

I am using an ACR122U NFC reader to password protect an NTAG213 NFC label. I think I have managed to set the password correctly, but I cannot authenticate and change the label afterward. My code for authenticating looks like this: #include…
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
  • 121
  • 3
  • 10
4
votes
2 answers

Get mifare card serial number with WinSCard library

I am working on an application that required reading the mifare card serial number, the language I am working with is C#. I am new to mifare reader programming, so I am sorry for asking dumb question. At first I would like to know if there is a…
cyrus-d
  • 749
  • 1
  • 12
  • 29
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,213
  • 1
  • 14
  • 28
1
2 3 4 5 6 7