Winscard support (for smart cards)

Eric Pouech eric.pouech at
Mon Apr 30 07:11:56 CDT 2007

Mounir IDRASSI a écrit :
> Hi ,
> Thank you for all your comments.
> Concerning the header files, they contain portions taken from Microsoft
> headers. We will rewrite them to remove any copyright issues.
> For the types used, they are more close to pcsc-lite than Microsoft but
> still compatible at the binary level. We will modify them to be more
> close to MS SDK definitions.
you have to ensure that binary compat is present for both pcsc-lite and 
if not, then you'll have to convert back and forth the non "portable" types
> We understand the issue of having a big patch. I'll split it into small
> parts as you advised. The same applies to winscard.c file.
> Concerning the exported variables, we think we have followed the msvcrt
> example: "@ extern name" in the spec file and the declaration in a c
> file. The variables exported are visible from win32 programs and are
> used without any problem.
> However, there is still an issue: when when try to compile a source file
> that uses them using winegcc, we get an unresolved symbol error. Did we
> miss something? The only difference we see with msvcrt source is that
> winscard exported variables have a structure as a type, whereas msvcrt
> exported variables are pointers.
actually, we don't provide exported variables when those are used from a 
native module (those would work from a builtin module though)
if you really need to access them from a builtin module you have to:
- define a pointer to this (exported) variable
- get the address of this variable: 
GetProcAddress(GetModuleHandle("modname.dll"), "varname")
- access the variable through the pointer


Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)

More information about the wine-devel mailing list