Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement