Information générale
Catégorie:
Fonctions Windows API
>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement