Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • This really is wrong forum, i imagine that there are better places to ask these questions, perhaps call ACS, the maker of the reader and designer of the API? Commented Jul 19, 2016 at 21:09
  • But I think they do this with PS SC communications which is written in windows.h, the point is which function can set the reader without using hcard handle! Commented Jul 19, 2016 at 21:24
  • Ok, i did this, googled your readers name, got the ACS site from the result, found a pdf describing the API, read some.. ..and found this lube: "The reader's peripheral control commands are implemented by using SCardControl with Control Code SCARD_CTL_CODE(3500)". And by the look of it, you are using the PCSC API. Commented Jul 20, 2016 at 5:49
  • I knew that , I also found uint controlcode = 3225264; by debugging SCARD_CTL_CODE(3500) in c++. the problem is with windows.h functions which are scardcontrol and scardTransmit. and they give errors when the card is not on the card reader. and I want to control the reader without presence of the card!. my objective is to turn off the Rf ,Leds and buzzer when the card is on it; and then if i trigger a button in my software while the card is not present on the reader all of these turn on. Commented Jul 20, 2016 at 7:29
  • The cause is that SCARD_CTL_CODE is a macro that is resolved at compile, there is no guarantee that you get that particular uint. So you do right by calling the macro as in you answer. Commented Jul 20, 2016 at 8:59