Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass a date to a DLL?
Message
From
13/12/1997 12:38:00
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00065737
Message ID:
00065761
Views:
51
>Peter,
>
>Thanks a lot. Here is what I found in the header file.
>
>typedef struct tagDPIDate
>{
> short jour;
> short mois;
> short annee;
>} DPIDate, FAR * LPDPIDate;

Each short is a 2-byte integer. So, you need to pass a string of 6 bytes. For the conversions from VFP numerical type to short 2-byte string:

lcJour = chr(lnJour % 256) + chr(int(lnJour / 256))
lcMois = chr(lnMois % 256) + chr(int(lnMois / 256))
lcAnnee = chr(lnAnnee % 256) + chr(int(lnAnnee / 256))

And pass the lcJour+lcMois+lcAnnee to the DLL function.

Probably you already knew how to do this, but...

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform