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

Winscard.dll SCardEstablishContext is not returning the context in visual studio 2022

I am working on a desktop application which will write to smart card. I am using .Net Maui (VS 2022 preview) for building this. I have added a separate class file in which I am importing the winscard.dll and calling SCardEstablishContext as…
0
votes
1 answer

Select File APDU command failing with MiFare 1k card

I'm using PCSC-Sharp to transmit commands to a card. The specific command is: 00 A4 04 0C 0C D2 76 00 01 35 4B 41 4E 4D 30 31 00 00 So I did the following: var contextFactory = ContextFactory.Instance; using (var ctx =…
Ivan-Mark Debono
  • 15,500
  • 29
  • 132
  • 263
0
votes
0 answers

APDU Read Binary returns wrong data

I am trying to read a swiss insurance card. First the Marster file is selected and then the EF.ID file is selected. When reading binary for the EF.ID datas, the response is correct once and only once. Afterward I always get a different data response…
0
votes
1 answer

SCardTransmit return empty buffer

Im trying to learn using winscard.dll in C# and I have a problem when running the SCardTransmit() where it always return me an empty buffer. Here is my test code: class Program { static void Main(string[] args) { …
of32 inc
  • 105
  • 1
  • 7
0
votes
1 answer

flutter:SCardTransmit was successful, but Idm cannot be retrieved

contents int SCardTransmit( int hCard, Pointer pioSendPci, Pointer pbSendBuffer, int cbSendLength, Pointer pioRecvPci, Pointer pbRecvBuffer, …
0
votes
0 answers

SCardConnect C# Memory Leak

I am having trouble fixing a memory leak causes by SCardConnect function in winscard.dll library wrapper. Are there a way to fix the memory by winscard.dll Summary: When the SCardConnect successfully returns 0, which means that there is a card…
0
votes
1 answer

Can't read RFID card USB with winscard.dll c#

I'have reader: Promag PCR-300FMU, USB (no manuel, no SDK). So I looked after the doc on winscard.dll public List ListReaders() { int ReaderCount = 0; List AvailableReaderList = new List(); //Make…
Neotof Tof
  • 53
  • 1
  • 9
0
votes
0 answers

SCardControl 5x slower if executed on thread in C# application

I'm building a C# Win Form application with Visual Studio 2019, that aims to communicate with a SmartCards (ACR 122U). To be short: the type of tags I'm working with are passive tags that aren't recognized by the reader. The only way to work with…
Lorenzo
  • 1
  • 1
0
votes
2 answers

Determine if the computer is locked

I have a macro that send me a text from outlook when a meeting notification pops up. I would like to figure out a way to make that macro only run if I am not at my computer. I have looked for a way to pull my status from Skype for Business,…
0
votes
0 answers

C# WPF zebra smartcard printer ZC 350 : application work in visual studio but crashes when running the exe

I have a WPF application in C# 8 on .NET 4.8 on the latest version of windows 10 in VS 2019. It prints & writes mifare cards on a zebra ZC 350 printer via the link OS SDK of zebra. It works fine when run inside Visual studio (in debug mode) but when…
0
votes
1 answer

Smart card reader not dedected - PCSC Error - 0x8010002e

My system was working fine but now my any application is not detecting the smart card reader ( SCM Microsystem) attached in the system while it is displaying in device manager. Here I tried to get the exact error with trying C++ code (winscard.h) to…
Arjun
  • 3,491
  • 4
  • 25
  • 47
0
votes
1 answer

Why won't Omnikey 5325 smartcard reader recognize my card?

I purchased a smartcard reader (OMNIKEY 5325 CL USB Prox) and installed all the drivers but I it won't read my card (1386 ISOProx II Card). The diagnostic tool doesn't seem to recognize it, and calling SCardTransmit returns ERROR_GEN_FAILURE. The…
Sean
  • 335
  • 5
  • 12
0
votes
0 answers

How to run a code in backgroundworker without consuming processor time and resources?(How to stop an intentional infinite loop?)

I wrote an intentional infinite loop to identify if card is detected or removed on the reader using vb.net. Because I don't know if there is something like waitForCardPresent in winscard. So the concept is once the button Connect was clicked, the…
0
votes
2 answers

PCSC detect multiple smartcards

Is it possible to detect when there are multiple smartcards in a smartcard reader through WinSCard api? I'm reading card ids, but when there are multiple cards, it becomes ambiguous, which one should be returned. So I'd like to forbid such case and…
eko
  • 369
  • 4
  • 15
0
votes
2 answers

Dual Interface smart card reader switching

I am using HID omnikey 5421 smart card reader. reader is dual interface, when i was reading dual interface (contact and contactless) card it's automtically read contactless data in sometime, contact data in sometime.but i want to read contact card…
senthilkumar2185
  • 2,536
  • 3
  • 22
  • 36