MS has 2 version of each function, an ascii and a double byte version.
The function name SCardListReaders is actually a define that is directed
to either SCardListReaderA or SCardListReadersW (wide char), depending
on the project settings. So if you have a unicode version, the wide char
version is used, otherwise, the "regular" version is used.
Here is a portion of winscard.h:
-----------------------
extern WINSCARDAPI LONG WINAPI
SCardListReadersA(
IN SCARDCONTEXT hContext,
IN LPCSTR mszGroups,
OUT LPSTR mszReaders,
IN OUT LPDWORD pcchReaders);
extern WINSCARDAPI LONG WINAPI
SCardListReadersW(
IN SCARDCONTEXT hContext,
IN LPCWSTR mszGroups,
OUT LPWSTR mszReaders,
IN OUT LPDWORD pcchReaders);
#ifdef UNICODE
#define SCardListReaders SCardListReadersW
#else
#define SCardListReaders SCardListReadersA
#endif // !UNICODE
-----------------------
Gil.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ludovic
Rousseau
Sent: Tuesday, April 25, 2006 5:01 PM
To: MUSCLE
Subject: Re: [Muscle] problem installing pycsc
On 25/04/06, Karsten Ohme <[EMAIL PROTECTED]> wrote:
> shoichi wrote:
> > It works!Just LPSTR -->LPTSTR
> >
> > LPCSTR -->LPCTSTR
> > What's the different betwween without"T" and with "T"?
>
> Support of Unicode. Microsoft uses the UTF-16 format (?), every
> character is coded with two bytes (this is near the truth) to support
> all languages, good for internationalization of programs. Without the
> T only the charset of the system is used, e.g. ASCII.
Ah ok. That's why the MSDN sample code for SCardListReaders() uses
"printf("Reader: %S\n", pReader );" (note the capital S in %S).
So we have an API difference between pcsc-lite and MS PC/SC :-(
> (But pcsc-lite has no support for Unicode.)
pcsc-lite can use UTF-8 since the reader name is transparent for
pcs-lite. Just put whatever reader name you want /etc/reader.conf of
Info.plist.
I don't know why MS chose to use UTF-16 instead of UTF-8. UTF-8 is
backward compatible with ASCII so (very) easy to migrate to.
Bye,
--
Dr Ludovic Rousseau
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle