General information
Category:
Windows API functions
>Hi Paul;
>
> Below is the data structure declare in C.
>>>struct Session
>>>{
>>> WORD8 CardType;
>>> WORD8 ResetLen;
>>> BYTE ResetChar[RESET_LEN_MAX];
>>> WORD8 HistLen;
>>> WORD8 HistOffset;
>>> WORD8 Dummy;
>>> WORD32 ApduLenMax;
>>>};
>>
>>>struct Apdu
>>>{
>>> BYTE Command[COMMAND_LEN];
>>> WORD16 LengthIn;
>>> BYTE *DataIn;
>>> WORD32 LengthExpected;
>>>};
>>
>>>struct Resp
>>>{
>>> WORD32 LengthOut;
>>> BYTE *DataOut;
>>> WORD16 Status;
>>>};
>>typedef struct Session SESSION_PARAM;
>>typedef struct Apdu APDU_COMM;
>>typedef struct Resp APDU_RESP;
>>
>Below is one of function call
>1)G_ExchangeApdu(const BYTE ChannelNb,APDU_COMM *ApduComm,
> APDU_RESP far *ApduResp);
>The DLL file is V100_32.DLL
>
>How to call the function in VFP, i know have to use your Pointer.vcx or Ed Rauh CLSHEAP.prg.
DECLARE G_ExchangeApdu IN V100_32.dll INTEGER ChannelNb, STRING @ApduComm, STRING @ApduResp
= G_ExchangeApdu(ChannelNb, @ApduComm, @ApduResp)
Obviously, you have to build the last 2 params in some strings.
>Ed Rauh told me that since far * in C is represent Win16, so can i use declare statement to call teh DLL as well as the function ?
Since the name of the dll ends in "32", it looks like a 32-bit dll and in this case you can use DECLARE. "far *" is the same as "*" in Win32 programming.
Vlad
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only