Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to read/convert 32-bit IEEE floating-point values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00921059
Message ID:
00921118
Vues:
14
Sergey,
I put the @ in the call to the procedure and in the DLL call per George Tasker's post and it works. Now I just have to get the floating point stuff.
Thanks again,
John.


>>thanks for the help but I can't get the Intiger function to run. I took out the double AS AS but I still get the error "Declare DLL caused an exception"
>>I tried moving the DECLARE to the top of the program so it would only be called once but still go the same thing. I also took the AS RtlCopyNum out completly and changed the name in the funciton but I still get the same thing.

>
>Sorry about "AS AS". Here's correct code and example on how to use it.
* Create an integer with value 5
>lcInteger = CHR(5) + CHR(0) + CHR(0) + CHR(0)
>* Convert it
>? Long2Num(lcInteger)
>
>* Convert Long integer into VFP numeric variable
>FUNCTION Long2Num(tcLong)
>DECLARE RtlMoveMemory IN WIN32API AS RtlCopyNum ;
>	Long @Dest, String @Source, Long Length
>LOCAL lnNum
>lnNum = 0
>= RtlCopyNum(@lnNum, tcLong, 4)
>RETURN lnNum
>
>
>
>>I haven't tried the 64 bit floating point but what would I do to convert it to 32 bit? Or should I ask Dragan?
>
>I guess.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform