L
Leela
I am new to wince and am having various issues trying to do some basic
io routines. From reading the other posts, I have gained a wealth of
information regarding utilizing ceddk for doing this. I am trying to
utilize pinvoke to call READ_PORT_UCHAR() and WRITE_PORT_UCHAR() w/in
CF written in VB. I am using an x86 based platform and I have verified
ceddk.dll in the \windows on the CE device.
So far I have:
<DllImport("ceddk.dll")> _
Public Shared Function READ_PORT_UCHAR( _
ByRef Port As int16 _
) As Byte
End Function
<DllImport("ceddk.dll")> _
Public Shared Function READ_PORT_UCHAR( _
ByRef Port As int16 _
) As Byte
End Function
the io base port address is 0X300 and I am trying to read the lower
nibble at 0X303
and when I pass in an int of 771 ( 0X303) I get a return of 255 from
READ_PORT_UCHAR() when the actual read should be 0X000 or 0
I've verified that the return read should be 0 by booting into dos and
using the inportb function.
As a matter of fact, no matter what I pass in (any int value), I get a
return read value of 255.
Please help.... any help is greatly appreciated. Thanks in advance.
io routines. From reading the other posts, I have gained a wealth of
information regarding utilizing ceddk for doing this. I am trying to
utilize pinvoke to call READ_PORT_UCHAR() and WRITE_PORT_UCHAR() w/in
CF written in VB. I am using an x86 based platform and I have verified
ceddk.dll in the \windows on the CE device.
So far I have:
<DllImport("ceddk.dll")> _
Public Shared Function READ_PORT_UCHAR( _
ByRef Port As int16 _
) As Byte
End Function
<DllImport("ceddk.dll")> _
Public Shared Function READ_PORT_UCHAR( _
ByRef Port As int16 _
) As Byte
End Function
the io base port address is 0X300 and I am trying to read the lower
nibble at 0X303
and when I pass in an int of 771 ( 0X303) I get a return of 255 from
READ_PORT_UCHAR() when the actual read should be 0X000 or 0
I've verified that the return read should be 0 by booting into dos and
using the inportb function.
As a matter of fact, no matter what I pass in (any int value), I get a
return read value of 255.
Please help.... any help is greatly appreciated. Thanks in advance.