Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I use this DLL?
Message
From
17/07/2007 15:25:14
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01241170
Message ID:
01241260
Views:
20
>>>>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)  && Word has 16 bytes
>>>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.
Elyse Pomerantz
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform