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
3
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…
3
votes
1 answer

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…
3
votes
0 answers

define, initialize and use types in js-ctypes

SCardTransmit function is defined in https://msdn.microsoft.com/en-us/library/windows/desktop/aa379804%28v=vs.85%29.aspx I want to declare and use this function, I have problems with the definition of some arguments in js-ctypes (especially in type…
Hosein Aqajani
  • 1,375
  • 4
  • 21
  • 42
3
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…
3
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…
3
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
  • 409
  • 1
  • 7
  • 20
3
votes
0 answers

Emulate card reader

I'm doing a project in C# using winscard.dll to communicate with a smart card. Right now I'm don't have a card reader to test with, so I'm working on basic PInvoke layer right now, but I cannot test it because I don't have a smart card service…
user629926
  • 1,780
  • 1
  • 17
  • 36
3
votes
2 answers

How to use SCardGetStatusChange correctly on Windows 8?

The smart card service behaves differently on Windows 8 and MSDN hasn't updated their documentation. Can anyone give a code snippet on how to call SCardGetStatusChange correctly to monitor smart card actions on Windows 8? Thanks in advance!
leochou0729
  • 165
  • 1
  • 12
2
votes
1 answer

Unknown response from WINSCARD.DLL method SCardTransmit on O2Micro reader with response length information

For communcation with a Smartcard I use the WINSCARD.DLL as an API to send APDU commands to Smartcards. For a couple of cardreaders this is working as expected, but somehow I get an unkown return (it is not on…
René
  • 119
  • 1
  • 4
  • 12
2
votes
1 answer

C++ source in Windows 7 SCardGetStatusChange returns code 6

I am implementing a PKCS#11 library which will communicate with card readers using winscard in windows and PCSC in MAC. I am using the following sample code to get the card change status from readers. It works fine in MAC and returns 0x0122 for…
iOS-Developer84
  • 606
  • 7
  • 17
2
votes
0 answers

MIFARE desfire EV1 communication using winscard

I need some help communicating with Desfire EV1 card. The library (winscard.dll) seems to be automatically handling all responses from the card that have an ADDITIONAL_FRAME (AF) byte so that the application receives already processed data. For…
2
votes
1 answer

SCARD_F_INTERNAL_ERROR result from SCardGetStatusChange

I'm developing application that is using Mifare Classic 1K card and HID Omnikey 5421 (successor of 5321). I using thread to detect card remove/insert. Delphi code (thread method): function CardWatcherThread(PContext: Pointer): integer; var RetVar …
sliwinski.lukas
  • 1,284
  • 1
  • 16
  • 26
2
votes
2 answers

Smartcard reader naming

I have two readers (HID OMNIKEY 5321) in system (every reader performs a different function) reader 1 - "Smart Card Reader 0" reader 2 - "Smart Card Reader 1" In my program is set up that "Smart Card Reader 0" - action 1 "Smart Card Reader 1"…
Yuriy
  • 133
  • 10
2
votes
1 answer

Problems using SCardTransmit from winScard.dll reading a tag 4B

For two weeks I've been working on the task to read the tag, and a stored link, of an active NFC TI Chip. I also have a problem reading the ATR. My reader is a Springcard H663. I use the winScard.dll and managed to use SCardEstablishContext() and…
the dark one
  • 21
  • 1
  • 2
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
  • 7,748
  • 11
  • 71
  • 144