Export (0) Print
Expand All
div
eof
Expand Minimize
3 out of 4 rated this helpful - Rate this topic

_inp, _inpw, _inpd 

Inputs a byte (_inp), a word (_inpw), or a double word (_inpd) from a port.


int _inp( 
   unsigned short port 
);
unsigned short _inpw( 
   unsigned short port 
);
unsigned long _inpd( 
   unsigned short port 
);

Parameters

port

I/O port number.

The functions return the byte, word, or double word read from port. There is no error return.

The _inp, _inpw, and _inpd functions read a byte, a word, and a double word, respectively, from the specified input port. The input value can be any unsigned short integer in the range 0 – 65,535.

Because these functions read directly from an I/O port, they might not be used in user code in Windows NT, Windows 2000, Windows XP, and Windows Server 2003. For information about using I/O ports in these operating systems, use the Win32 Communications API.

Routine Required header Compatibility

_inp

<conio.h>

Windows 98, Windows Me, and kernel mode on Windows NT, Windows 2000, Windows XP, and Windows Server 2003

_inpw

<conio.h>

Windows 98, Windows Me, and kernel mode on Windows NT, Windows 2000, Windows XP, and Windows Server 2003

_inpd

<conio.h>

Windows 98, Windows Me, and kernel mode on Windows NT, Windows 2000, Windows XP, and Windows Server 2003

For more compatibility information, see Compatibility in the Introduction.

Libraries

All versions of the C run-time libraries.

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.