Revision: 10530 https://osdn.net/projects/ttssh2/scm/svn/commits/10530 Author: nmaya Date: 2023-01-22 11:47:02 +0900 (Sun, 22 Jan 2023) Log Message: ----------- EscapeCommFunction() 失敗時に GetLastError() でエラーを見えるようにした Modified Paths: -------------- branches/ttcomtester/tools/ttcomtester/main.cpp -------------- next part -------------- Modified: branches/ttcomtester/tools/ttcomtester/main.cpp =================================================================== --- branches/ttcomtester/tools/ttcomtester/main.cpp 2023-01-21 17:41:55 UTC (rev 10529) +++ branches/ttcomtester/tools/ttcomtester/main.cpp 2023-01-22 02:47:02 UTC (rev 10530) @@ -294,11 +294,19 @@ rts = false; b = EscapeCommFunction(h, CLRRTS); printf("RTS=0, %d\n", b); + if (b == 0) { + DWORD err = GetLastError(); + printf("error=0x%08d\n", err); + } } else { rts = true; b = EscapeCommFunction(h, SETRTS); printf("RTS=1, %d\n", b); + if (b == 0) { + DWORD err = GetLastError(); + printf("error=0x%08d\n", err); + } } break; }