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.
(But pcsc-lite has no support for Unicode.)
Karsten
>
>
> Ludovic Rousseau wrote:
>
>>On 24/04/06, shoichi <[EMAIL PROTECTED]> wrote:
>>
>>
>>> Today I tested another way:I rewrited setup.py line 32~39 changing
>>>"include = ["/usr/include/pcsc"] " to
>>> "include = ["/usr/local/include/PCSC"]"(I got known where pcsclite *.h
>>>being put default.).This time I got different message:
>>>
>>>
>>
>>Apply the attached patch.
>>
>>Bye
>>
>>--
>> Dr Ludovic Rousseau
>>
>>
>>------------------------------------------------------------------------
>>
>>--- pycsc-0.0.3/pycsc.c 2004-06-21 02:54:29.000000000 +0200
>>+++ pycsc-0.0.3.new/pycsc.c 2006-04-24 15:29:58.000000000 +0200
>>@@ -23,7 +23,7 @@
>> #endif
>>
>> /* Internal tool */
>>-static LONG getReaderList(SCARDCONTEXT hContext, LPSTR* pmszReaders,
>>+static LONG getReaderList(SCARDCONTEXT hContext, LPTSTR* pmszReaders,
>> DWORD *pdwReaders);
>>
>> #ifdef _WINDOWS_
>>@@ -256,14 +256,14 @@
>> BYTE pbAtr[MAX_ATR_SIZE];
>> DWORD dwAtrLen, dwProt=0, dwState=0;
>> DWORD dwReaderLen;
>>- LPSTR pcReaders;
>>+ LPTSTR pcReaders;
>> LONG rv;
>> PyObject *ret_value;
>>
>> dwReaderLen = 10000;
>> dwAtrLen = 0;
>> /* Dry run to get the length of the reader name */
>>- rv = SCardStatus( object->hCard, (LPSTR) NULL, &dwReaderLen,
>>+ rv = SCardStatus( object->hCard, (LPTSTR) NULL, &dwReaderLen,
>> &dwState, &dwProt, NULL, &dwAtrLen );
>>
>> if ( rv != SCARD_S_SUCCESS )
>>@@ -499,8 +499,8 @@
>> static PyObject * pycscobject_pycsc(PyObject *self, PyObject * args,
>> PyObject *keywds)
>> {
>> /* No reader name in args, connect to the first reader */
>>- LPSTR mszReaders = NULL;
>>- LPSTR szRequestedReader = "";
>>+ LPTSTR mszReaders = NULL;
>>+ LPTSTR szRequestedReader = "";
>> DWORD dwReaders;
>> DWORD dwMode = SCARD_SHARE_SHARED;
>> DWORD eProtocol; /* effective protocol */
>>@@ -611,8 +611,8 @@
>> static PyObject * pycscobject_listReader(PyObject *self, PyObject * args)
>> {
>> SCARDCONTEXT hContext;
>>- LPSTR mszReaders = NULL;
>>- LPSTR mszReadersScan;
>>+ LPTSTR mszReaders = NULL;
>>+ LPTSTR mszReadersScan;
>> DWORD dwReaders;
>> LONG rv;
>>
>>@@ -941,11 +941,11 @@
>> }
>>
>> /* Internal tool */
>>-static LONG getReaderList(SCARDCONTEXT hContext, LPSTR* pmszReaders, DWORD
>>*pdwReaders)
>>+static LONG getReaderList(SCARDCONTEXT hContext, LPTSTR* pmszReaders, DWORD
>>*pdwReaders)
>> {
>>- LPCSTR mszGroups = 0;
>>- LPSTR mszReaders = NULL;
>>- LONG dwReaders;
>>+ LPCTSTR mszGroups = 0;
>>+ LPTSTR mszReaders = NULL;
>>+ DWORD dwReaders;
>> LONG rv;
>>
>> /* Read size of reader list */
>>diff -ru pycsc-0.0.3/setup.py pycsc-0.0.3.new/setup.py
>>--- pycsc-0.0.3/setup.py 2004-01-19 17:09:32.000000000 +0100
>>+++ pycsc-0.0.3.new/setup.py 2006-04-24 15:27:48.000000000 +0200
>>@@ -31,7 +31,7 @@
>> include = []
>> else:
>> libs = ["pcsclite"]
>>- include = ["/usr/include/pcsc"]
>>+ include = ["/usr/include/PCSC"]
>>
>>
>> setup(name="pycsc", version="0.3",
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Muscle mailing list
>>[email protected]
>>http://lists.drizzle.com/mailman/listinfo/muscle
>>
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Muscle mailing list
> [email protected]
> http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle