>Ed Raud,
> Let me show you the .h files which consist the tydef of the structure :
>Below is the first .h file "gpl32.h":
>>typedef unsigned char WORD8;
>>typedef unsigned int WORD16;
>>typedef unsigned long WORD32;
>>typedef signed int INT16;
>>typedef unsigned char BYTE;
>
>>struct Channel
>>{
>> WORD8 Nb;
>> WORD8 ReaderType;
>> INT16 ReaderPort;
>> WORD32 BaudRate;
>>};
>
This channel structure will be created as a string; the first byte will be the Nb value, the second byte, the ReaderType value, the next two bytes are the Readerport as a signed integer, and the last 4 bytes are a DWORD representing baud rate. The functions for converting numbers to various binary forms are available in my CLSHEAP.PRG, as well as functions to change them back when you receive and parse this structure,
>>typedef struct Channel CHANNEL_PARAM;
>>INT16 _stdcall G_OpenChannel(CHANNEL_PARAM *Channel); /* function call*/
>
DECLARE SHORT G_OpenChannel IN
STRING @ Channel
>the second .h file "v100_32.h"
>>#define Baud9600 5
>>#define COM2 1
>
>below is the parameters want to pass when call the function:
>>CHANNEL_PARAM Chan1;
>>Chan1.BaudRate=Baud9600;
>>Chan1.ReaderPort=Com2;
If these were the only parameters, you'd build the structure using the functions in CLSHEAP by:
Chan1 = CHR(8) + CHR(1) + NumToBININT(1) + NumToDWORD(5)
I'm guessing at the value for Nb (usually it the structure length, but it could be something different), and ReaderType (no values are given).
>>G_openChannel(&Chan1)
=G_openChannel(@Chan1)
>
>How to call and pass the parameters to the function in the .DLL (v10032.dll) in VFP?
I answered above. You're on your own, now.
>is it i need to include the .h file in the VFP program ?
The .H file uses C notation. If you intend to use any of the constants defined in the .H file, you'll need to construct one that's VFP-complant.