inp
, _inp
, inpw
, _inpw
, _inpd
輸入,從埠、位元組(、)、單字( inp
inpw
、 _inpw
)或雙字( _inpd
)。 _inp
重要
這些函式已被取代。 自 Visual Studio 2015 起,這些函式即無法在 CRT 中使用。
此 API 無法用於在 Windows 執行階段 中執行的應用程式。 如需詳細資訊,請參閱 CRT functions not supported in Universal Windows Platform apps (通用 Windows 平台應用程式中不支援的 CRT 函式)。
語法
int _inp(
unsigned short port
);
unsigned short _inpw(
unsigned short port
);
unsigned long _inpd(
unsigned short port
);
參數
port
I/O 連接埠號碼。
傳回值
這些函式會傳回從 port
讀取而來的位元組、字組或雙字組。 沒有傳回錯誤。
備註
_inp
、 _inpw
及 _inpd
函式會從指定的輸入連接埠讀取位元組、字組及雙字組。 輸入的值可以是 0 - 65535 之間任何不帶正負號的 short 整數。
由於這些函式會直接從 I/O 埠讀取,所以無法在使用者程式碼中使用。
inp
和 inpw
名稱較舊、已被取代的 _inp
和 _inpw
函式名稱。 如需詳細資訊,請參閱 POSIX 函式名稱 。
需求
常式 | 必要的標頭 |
---|---|
_inp |
<conio.h> |
_inpw |
<conio.h> |
_inpd |
<conio.h> |
如需相容性詳細資訊,請參閱相容性。
程式庫
所有版本的 C 執行階段程式庫。
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應