>>>>>I have the following information (this is an excerpt) about a DLL that I would like to use in my VFP application, but I can't seem to get it to work. What is the correct way to declare and use it? Ultimately I want the value returned from the GetReading() function.
>>>>>
>>>>>
>>>>>typedef struct hdate_t {
>>>>> WORD day;
>>>>> WORD month;
>>>>> WORD year;
>>>>>} HDATE_T;
>>>>>
>>>>>typedef struct reading_t {
>>>>> int reading1;
>>>>> int reading2;
>>>>> int special;
>>>>>} READING_T;
>>>>>
>>>>>KDATE_API HDATE_T CivilToHebrew(int day, int month, int year);
>>>>>KDATE_API READING_T GetReading(HDATE_T hd, int diaspora);
>>>>>
>>>>>Thanks!
>>>>
>>>>
>>>>Try:
>>>>
>>>>DECLARE STRING GetReading IN ..... STRING @hd, INTEGER dspr
>>>>
>>>>
>>>>hd = REPLICATE(CHR(0),3*16)
>>>>lcRes = GetReading(@hd, 0)
>>>>? lcRes
>>>>
>>>>The you should convert lcRes from string to 3 integers.
>>>
>>>But the hd parameter that I am passing to GetReading has to be the result of the CivilToHebrew function. How can I declare/use the CivilToHebrew function?
>>
>>
>>
>>
>>Hmmm,
>>try:
>>
>>DECLARE STRING CivilToHebrew IN ..... INTEGER nDay, integer nMonth, integer nYear
>>DECLARE STRING GetReading IN ..... STRING hd, INTEGER dspr
>>
>>lcRes = GetReading(CivilToHebrew(........), 0)
>>? lcRes
>>
>
>I get "Declare DLL call caused an exception."
>Somehow I need to get the structure returned by the CivilToHebrew function and then pass it to the GetReading function.
Can you send me that DLL?
I can't promise that I would answer you today, because I am going to sleep soon :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.