Lines 23-29
Link Here
|
23 |
#endif |
23 |
#endif |
24 |
|
24 |
|
25 |
/* Internal tool */ |
25 |
/* Internal tool */ |
26 |
static LONG getReaderList(SCARDCONTEXT hContext, LPSTR* pmszReaders, |
26 |
static LONG getReaderList(SCARDCONTEXT hContext, LPTSTR* pmszReaders, |
27 |
DWORD *pdwReaders); |
27 |
DWORD *pdwReaders); |
28 |
|
28 |
|
29 |
#ifdef _WINDOWS_ |
29 |
#ifdef _WINDOWS_ |
Lines 256-269
Link Here
|
256 |
BYTE pbAtr[MAX_ATR_SIZE]; |
256 |
BYTE pbAtr[MAX_ATR_SIZE]; |
257 |
DWORD dwAtrLen, dwProt=0, dwState=0; |
257 |
DWORD dwAtrLen, dwProt=0, dwState=0; |
258 |
DWORD dwReaderLen; |
258 |
DWORD dwReaderLen; |
259 |
LPSTR pcReaders; |
259 |
LPTSTR pcReaders; |
260 |
LONG rv; |
260 |
LONG rv; |
261 |
PyObject *ret_value; |
261 |
PyObject *ret_value; |
262 |
|
262 |
|
263 |
dwReaderLen = 10000; |
263 |
dwReaderLen = 10000; |
264 |
dwAtrLen = 0; |
264 |
dwAtrLen = 0; |
265 |
/* Dry run to get the length of the reader name */ |
265 |
/* Dry run to get the length of the reader name */ |
266 |
rv = SCardStatus( object->hCard, (LPSTR) NULL, &dwReaderLen, |
266 |
rv = SCardStatus( object->hCard, (LPTSTR) NULL, &dwReaderLen, |
267 |
&dwState, &dwProt, NULL, &dwAtrLen ); |
267 |
&dwState, &dwProt, NULL, &dwAtrLen ); |
268 |
|
268 |
|
269 |
if ( rv != SCARD_S_SUCCESS ) |
269 |
if ( rv != SCARD_S_SUCCESS ) |
Lines 499-506
Link Here
|
499 |
static PyObject * pycscobject_pycsc(PyObject *self, PyObject * args, PyObject *keywds) |
499 |
static PyObject * pycscobject_pycsc(PyObject *self, PyObject * args, PyObject *keywds) |
500 |
{ |
500 |
{ |
501 |
/* No reader name in args, connect to the first reader */ |
501 |
/* No reader name in args, connect to the first reader */ |
502 |
LPSTR mszReaders = NULL; |
502 |
LPTSTR mszReaders = NULL; |
503 |
LPSTR szRequestedReader = ""; |
503 |
LPTSTR szRequestedReader = ""; |
504 |
DWORD dwReaders; |
504 |
DWORD dwReaders; |
505 |
DWORD dwMode = SCARD_SHARE_SHARED; |
505 |
DWORD dwMode = SCARD_SHARE_SHARED; |
506 |
DWORD eProtocol; /* effective protocol */ |
506 |
DWORD eProtocol; /* effective protocol */ |
Lines 611-618
Link Here
|
611 |
static PyObject * pycscobject_listReader(PyObject *self, PyObject * args) |
611 |
static PyObject * pycscobject_listReader(PyObject *self, PyObject * args) |
612 |
{ |
612 |
{ |
613 |
SCARDCONTEXT hContext; |
613 |
SCARDCONTEXT hContext; |
614 |
LPSTR mszReaders = NULL; |
614 |
LPTSTR mszReaders = NULL; |
615 |
LPSTR mszReadersScan; |
615 |
LPTSTR mszReadersScan; |
616 |
DWORD dwReaders; |
616 |
DWORD dwReaders; |
617 |
LONG rv; |
617 |
LONG rv; |
618 |
|
618 |
|
Lines 941-950
Link Here
|
941 |
} |
941 |
} |
942 |
|
942 |
|
943 |
/* Internal tool */ |
943 |
/* Internal tool */ |
944 |
static LONG getReaderList(SCARDCONTEXT hContext, LPSTR* pmszReaders, DWORD *pdwReaders) |
944 |
static LONG getReaderList(SCARDCONTEXT hContext, LPTSTR* pmszReaders, DWORD *pdwReaders) |
945 |
{ |
945 |
{ |
946 |
LPCSTR mszGroups = 0; |
946 |
LPCTSTR mszGroups = 0; |
947 |
LPSTR mszReaders = NULL; |
947 |
LPTSTR mszReaders = NULL; |
948 |
LONG dwReaders; |
948 |
LONG dwReaders; |
949 |
LONG rv; |
949 |
LONG rv; |
950 |
|
950 |
|