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
2
votes
2 answers

Do smartcards return sw=9000 when T=0, Lc>0, Le>0?

Perusing ISO/IEC 7816-3:2006, section 12.2.5 specifies what happens when the reader sends a command APDU with Lc>0, Le>0 for the T=0 transmission protocol (byte stream). The initial command TPDU has no Le field, and if the card responds…
yonran
  • 18,156
  • 8
  • 72
  • 97
2
votes
1 answer

SCardEstablishContext not setting context pointer

I am calling winscard.dll methods from C# and everything has been working fine in a test app. I am having difficulty establishing context when moving the code into a larger project. My call to establish context is as…
jim
  • 8,670
  • 15
  • 78
  • 149
2
votes
1 answer

Mystery: 4 Bytes should represent a Date, but how?

So I've been able to read some unsecured values from an official German smartcard. It works fine for Numbers and Strings, but I can't wrap my head around how to interpret Dates. The date I want to read is specified as 4 Byte Date as seen in the…
rretzbach
  • 744
  • 1
  • 6
  • 16
1
vote
1 answer

List only local SmartCard readers

I've been struggling to find a way for listing only locally available SmartCard readers. Or at least differentiate between local readers and readers shared via RDP session. I'm using SCardListReaders, but that lists all readers registered into the…
nothingam
  • 165
  • 1
  • 12
1
vote
0 answers

Read consecutive memory blocks smartcard Mifare 1k

I'm using a Mifare 1k card and the acr1252 reader; I'm developing using visual c++ and the Winscard library. I've successful achieved to read the single block using the following code: // Read binary blocks // Class: FF // INS: B0 // P1: 00 // P2:…
S.Orioli
  • 443
  • 6
  • 21
1
vote
0 answers

How can a third party Smart Card reader talk to a HID iCLASS card?

I am attempting to use a Broadcom contactless smard card reader to read a HID iCLASS card using PC/SC and . I can successfully read the card's serial number by calling winscard's SCardTransmit function with the APDU FF CA 00 00 00;…
chessofnerd
  • 1,219
  • 1
  • 20
  • 40
1
vote
1 answer

Smart Card reader PCSC with multiple slots

I implemented a Card reader with CCID Protocol based on a microcontroller with three card slots. In the description of the Protocol each team has the bytes of the numbers of slots for receiving the command. The computer I use the app PCSC_Sample…
Egor Vasilyev
  • 303
  • 2
  • 14
1
vote
1 answer

SCardEstablishContext returns 1753 (EPT_S_NOT_REGISTERED) on Windows 10 Home

I'm using the Windows SCard (Winscard.h) API in a user space application to interact with a smart card reader. The application works fine on a Windows 10 Enterprise computer which is also joined to a domain but not on a Windows 10 Home computer…
Bemipefe
  • 1,397
  • 4
  • 17
  • 30
1
vote
0 answers

Smart Card APIs throw First Chance exceptions but program runs fine

INTRODUCTION I am learning how to use Smart Card API in order to obtain card number once it gets inserted into reader. So far I have managed to create a working application that runs (as far as I can see) without errors. PROBLEM During debugging I…
AlwaysLearningNewStuff
  • 2,939
  • 3
  • 31
  • 84
1
vote
0 answers

Smart Card Interface data units mismatch

I'm writing code which reads data form Student ID card. After card initialization, selecting directory and file on card I start reading data form it with READ BINARY (B0). According to ISO 7816-4: Interindustry Commands for Interchange: If bit8=0…
elklepo
  • 509
  • 4
  • 17
1
vote
0 answers

What does the error code sw=6D04 mean?

According to ISO/IEC 7816, there are no 6DXX code except for XX=00, but 6D04 is what I'm getting. Does anyone know or is there a more up-to-date version available? I don't think, it can be something like "Instruction code not supported or invalid"…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
1
vote
2 answers

WinSCard SCARD_E_PROTO_MISMATCH when connecting to Estonian ID card

I am trying to read the personal file of the Estonian ID card. I need to send the following data to the card (from here) in order to read records from the personal file (ie ID Number, name, etc): 00 A4 00 0C # We choose root folder 00 A4…
boxmein
  • 865
  • 7
  • 19
1
vote
1 answer

Best way to measure the time of an APDU command to a Java Card in c++

I'm trying to do some kind of timing attack to a Java Card.I need a way to measure the time elapsed between sending the command and getting the answer.I'm using the winscard.h interface and the language is c++. .I created a wrapper to winscard.h…
Alberto12
  • 509
  • 2
  • 16
1
vote
0 answers

Differentiate between smartcard / eeprom card

Problem: My programm can differentiate between two types of cards: smartcards and simple eeprom cards(Typ AT24C02SC). I get the following error into windows system event log: Smart Card Reader 'SCM Microsystems Inc. SCR33x USB Smart Card Reader …
F3rdiFuchs
  • 11
  • 4
1
vote
0 answers

Smart card GENERAL AUTHENTICATE fails under VMWare

Trying to work with a smart card reader from a VMWare Player virtual machine, which is Windows 8.1 AMD64. The card is a US gov't issued PIV card, as described in the respective NIST standard. The host is Windows 7 AMD64. I'm working with WinSCard…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281