Bruno Jesus 00cpxxx at
Fri Sep 30 05:49:07 CDT 2011

On Fri, Sep 30, 2011 at 06:42, Vincent Hardy < at> wrote:
> Hi all,
> Here are four patches that are a partial but functional implementation of
> winscard.

Congratulations =)

> I installed "Belgian Electronic Identity Card MiddleWare"
> (
> I tested winscard by starting beid35gui.exe and I can see my identity card
> data.

I can help you test this (although currently I'm lacking the time to),
I have 8 different contact and contactless readers and dozens of
different card types. And several demo applications and full fledged
hsm applications that run with over 200 smartcards at the same time =)

> Moreover, this should help to solve this bug
> Are these 4 patches good enough to be sent to wine-patch ?
> winscard is really useful for me and probably for other people too.

I'm not used to patch reviewing but here are my comments:

You don't need to check for invalid parameters on the functions, at
least in most of them. pcsclite should do that by itself and for
example in the SCardListreaders you don't need to interpret
AUTOALLOCATE because pcsclite handles that [1].

In SCardConnect you are also checking and returning the invalid
parameters error but pcsclite checks that [1].

Again with SCardStatus, I guess it should be as simple as a forward to pcsclite.

You're defining MAX_ATR_SIZE 36 but the standard ISO 7816 value is 33
bytes and both pcsclite and windows winscard use 33.

At least once you do HeapAlloc + memset zero, usually this can be done
by passing a flag HEAP_ZERO_MEMORY to HeapAlloc.

> Vincent

[1] =

Best wishes,

More information about the wine-devel mailing list