Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't pass parameter and call function in the DLL
Message
De
16/02/1999 20:16:17
 
 
À
16/02/1999 03:54:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00182255
Message ID:
00188213
Vues:
22
>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
Fil
Voir

Click here to load this message in the networking platform