Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


Createfile 可用來取得序列連接埠的控制代碼。「 Win32 程式設計人員參考 」 的 「 Createfile 」 項目提及的共用模式必須是 0、 建立參數必須是 OPEN_EXISTING,以及範本必須是 NULL。當您使用 "COM1" 到 "COM9" 作為檔案的名稱時,CreateFile() 成功。不過,訊息


將會在您使用 "COM10" 或以上時回傳。如果連接埠的名稱是 \\.\COM10,呼叫 Createfile 中指定的序列連接埠的正確方式如下: CreateFile( "\\\\.\\COM10", // address of name of the communications device fdwAccess, // access (read-write) mode 0, // share mode NULL, // address of security descriptor OPEN_EXISTING, // how to create 0, // file attributes NULL // handle of file with attributes to copy ); 附註: 此語法也適用於透過 COM9 的 COM1 連接埠。某些版可讓您選擇的連接埠名稱自己。這個語法適用於這些名稱也中。

Need more help?

Want more options?



Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!