ccy / pcsc Goto Github PK
View Code? Open in Web Editor NEWInfintuary Pascal PC/SC Sample
Infintuary Pascal PC/SC Sample
On GNU/Linux and Windows we have something like:
typedef LONG SCARDCONTEXT;
typedef LONG SCARDHANDLE;
See https://pcsclite.apdu.fr/api/pcsclite_8h.html#a22530ffaff18b5d3e32260a5f1ce4abd
And we also have:
typedef long LONG;
See https://github.com/LudovicRousseau/PCSC/blob/master/src/PCSC/wintypes.h#L92
On a 64-bits CPU the long
is 32 bits on Windows but is 64 bits on GNU/Linux.
This is because Windows is a LLP64 system but Linux is a LP64 system. See https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models
And THandle
is System.THandle
which is LongInt
which is 32-bits https://www.freepascal.org/docs-html/rtl/sysutils/thandle.html
So your code at https://github.com/ccy/pcsc/blob/master/MD_PCSCRaw.pas#L209 is wrong and will create a stack overflow.
pcsc-lite will write a 64 bits value when your wrapper only provides room for 32 bits.
I tried to use the TPCSC class but I was not able to find a method to list the smart card readers.
It looks like the only way to get the reader list is to use events using TPCSC.OnReaderFound
.
I am able to use the list TPCSC.ReaderList[]
but the list is empty even if a reader is connected.
The list .ReaderList[]
is updated by TPCSC.GetPCSCReaderList()
at https://github.com/ccy/pcsc/blob/master/MD_PCSC.pas#L895 but I can't call this method as it is private.
Did I miss something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.