tags:

views:

1119

answers:

1

Hi, The PC-SC component by nobbi.com doesn't seem to be Delphi 2009 compliant. I had to convert PChars to PAnsiChars but I still couldn't access ReaderList properly, all I could get was bunch of "|"s. So, is there any PC-SC wrapper for Delphi 2009, or a sample application of Omnikey's Sync API for Delphi? C# samples for Sync API are fine aswell, as I can use them as DLL under Delphi.

The device I'll be using is Omnikey 5321, mainly for MIFARE purposes.

+1  A: 

That is the only framework I am aware of for Delphi. I have been keeping any eye out since as far back as 2001 and have not seen anything better.

I did some commercial SC development for the financial sector and ended up rolling my own framework for Delphi 5/7. I had the requirement to monitor card change events (insert/remove) and end up using a background thread. The solution was robust and worked very well.

The porting to D2009 should not be that difficult since the API is relatively small. Watch out for structure alignment and of course Unicode. As I recall the structure alignment required some fudging to get right (i.e. padding bytes were needed).

Best of luck!

David

David Taylor
Thanks for the advice. I resorted to using nobbi's component within D7 DLL under my D2009 app, heh. By the way, did you use Omnikey's scardsyn.dll?
Ertugrul Tamer Kara
Not a bad solution, though I am sure the D2009 problem can be resolved with a little more work. I have done some work with Omnikey's DLL as well as other proprietary reader driver stacks where performance was critical. FWIW - I used to be heavily involved in SC personalization for a large service bureau.
David Taylor
Nice. If it's not private and you don't mind, could you please provide sample code block from SCardCLMifareStdAuthent function in Delphi? Fyi, my function always returned `6` as result somehow - I'm quite sure login info and everything else was correct-. I ended up using scardsyn.dll functions over my VB6 ActiveX DLL..
Ertugrul Tamer Kara
I would love to share, but unfortunately I do not own the code and the work is covered under a strict NDA. Most of the code was related to GP (Global Platform) cards, though I have also done work on Mifare using vendor proprietary tools. Best of luck with your programming...persistence and creativity is usually rewarded with success :)
David Taylor