On Wed, Jun 22, 2011 at 4:32 PM, Ludovic Rousseau
<[email protected]> wrote:
> Hello,
>
> 2011/6/22 Fred Flinestone <[email protected]>:
>> My code on 32bit linux works fine and it returns correct dwState as I expect.
>>
>> I don't know the reason why on 64bit linux it returns always dwState = 0
>> which even not declared by documentation.
>> Result code of SCardStatus returns 0.
>>
>> What could be a reason for this behavior?
>
> A bug in your program?
>
> Without your source code I can't say much more.
OK, I will try to cut out the part of pascal code:
declarations:
//typedef int32_t SCARDHANDLE;
SCARDHANDLE = LongInt;
//PCSC_API int32_t SCardStatus(SCARDHANDLE hCard, char
*mszReaderNames, uint32_t *pcchReaderLen, uint32_t *pdwState, uint32_t
*pdwProtocol, unsigned char *pbAtr, uint32_t *pcbAtrLen);
TSCardStatus = function (hCard: SCARDHANDLE; mszReaderNames:
LPStr; pcchReaderLen: PDWORD; pdwState: PDWORD; pdwProtocol: PDWORD;
pbAtr: PByte; pcbAtrLen: PDWORD): LongInt; cdecl;
hCard :SCARDHANDLE;
dwZero :DWORD;
dwState :DWORD;
dwProtocol :DWORD;
pbAtr :ARRAY [0..MAX_ATR_SIZE] OF BYTE;
dwAtrSize :DWORD;
dwZero := 0;
dwAtrSize := SizeOf (pbAtr);
RESULT := SCardStatus (hCard, NIL, @dwZero, @dwState,
@dwProtocol, PByte (pbAtr), @dwAtrSize);
Thanks.
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle