General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only