摘要: 根據某本天書說明首先要Configure a serial port1.呼叫 CreateFile() 來開一個預設設定的新埠。2.初始化 DCB 結構內的 DCBlength 的成員。3.呼叫 GetCommState() 看剛剛開的埠的參數設定。4.修改 DCB 以符合需求。5.呼叫 SetCommState() 設定參數。於是有了以下的範例// Open the serial port.// 參數1. Pointer to the name of the port// 參數2. Access (read/write) mode// 參數3. Share mode// 參數4. Point 阅读全文