_outp、_outpw、_outpd_outp, _outpw, _outpd

按端口、字节 (_outp)、字 (_outpw) 或双字 (_outpd) 输出。Outputs, at a port, a byte (_outp), a word (_outpw), or a double word (_outpd).

重要

这些函数已过时。These functions are obsolete. 从 Visual Studio 2015 开始,CRT 中不再提供这些函数。Beginning in Visual Studio 2015, they are not available in the CRT.

重要

此 API 不能用于在 Windows 运行时中执行的应用程序。This API cannot be used in applications that execute in the Windows Runtime. 有关详细信息,请参阅通用 Windows 平台应用中不支持的 CRT 函数For more information, see CRT functions not supported in Universal Windows Platform apps.

语法Syntax


      int _outp(  
unsigned short port,  
int databyte   
);  
unsigned short _outpw(  
unsigned short port,  
unsigned short dataword   
);  
unsigned long _outpd(  
unsigned short port,  
unsigned long dataword   
);  

参数Parameters

portport
端口号。Port number.

databyte、dataworddatabyte, dataword
输出值。Output values.

返回值Return Value

这些函数返回数据输出。The functions return the data output. 无错误返回。There is no error return.

备注Remarks

_outp_outpw_outpd 函数分别将字节、字和双字写入指定的输出端口。The _outp, _outpw, and _outpd functions write a byte, a word, and a double word, respectively, to the specified output port. port 参数可为 0 - 65,535 范围内的任何无符号整数。databyte 可为 0 - 255 范围内的任何整数;dataword 可分别为整数、无符号短整数和无符号长整数范围内的任何值。The port argument can be any unsigned integer in the range 0 - 65,535; databyte can be any integer in the range 0 - 255; and dataword can be any value in the range of an integer, an unsigned short integer, and an unsigned long integer, respectively.

由于这些函数可直接将数据写入 I/O 端口,因此无法用于用户代码。Because these functions write directly to an I/O port, they cannot be used in user code. 有关在这些操作系统中使用 I/O 端口的信息,请在 MSDN 上搜索“Win32 中的串行通信”。For information about using I/O ports in these operating systems, search for "Serial Communications in Win32" at MSDN.

惠?Requirements

例程所返回的值Routine 必需的标头Required header
_outp <conio.h><conio.h>
_outpw <conio.h><conio.h>
_outpd <conio.h><conio.h>

有关更多兼容性信息,请参阅 兼容性For more compatibility information, see Compatibility.

Libraries

C 运行时库的所有版本。All versions of the C run-time libraries.

请参阅See Also

控制台和端口 I/O Console and Port I/O
_inp、_inpw、_inpd_inp, _inpw, _inpd