Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to define data type for integer,binary & hexadecima
Message
De
25/01/1999 07:32:02
 
 
À
24/01/1999 15:41:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00179567
Message ID:
00179752
Vues:
30
Ed Rauh,
Hi, remember me?
I have a problem when read the value from port Inp(PortAddress).
In vb that is ok but in Vfp the return value is not same !

VB code :
>Dim value as integer
>dim PortAddress as integer
>value=0
>Port Address= &H2Eo
>'Write to a port.
>Out PortAddress, Value
>'Read back and display the result.
>Text1.Text = Inp(PortAddress)

In the text box it display the value of 1

In VFP
>Public nData
>Public PortAddress
>nData=1
>PortAddress=0x2E0
>*Write to a port.
>Out(PortAddress, nData)
>*Read back and display the result.
>thisform.text1.value=Inp(PortAddress)

In the text box it display 13041665 and convert to Hexadecimal is C70001.
Sometime it also will display 13369344 convert to hexadecimal is CC0001.
What's wrong ? Actually the correct result is 1
The DLL i declare is 32bit , is it VFP is 32bit Application ?
thanks

regards
chang
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform