Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to define data type for integer,binary & hexadecima
Message
From
25/01/1999 07:32:02
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00179567
Message ID:
00179752
Views:
28
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform