Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass a date to a DLL?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00065737
Message ID:
00065761
Vues:
46
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform