DWORD WINAPI GetLastError(void);
https://msdn.microsoft.com/zh-cn/d852e148-985c-416f-a5a7-27b6914b45d4
BOOL GetCommModemStatus(
HANDLE hFile,
LPDWORD lpModemStat
);
https://docs.microsoft.com/zh-cn/windows/desktop/api/winbase/nf-winbase-getcommmodemstatus
BOOL GetOverlappedResult(
HANDLE hFile,
LPOVERLAPPED lpOverlapped,
LPDWORD lpNumberOfBytesTransferred,
BOOL bWait
);
https://docs.microsoft.com/en-us/windows/desktop/api/ioapiset/nf-ioapiset-getoverlappedresult