diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-19 18:27:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-19 18:27:06 (GMT) |
commit | 775e9aac009c6cd4a3cddbf67de9feac451f5662 (patch) | |
tree | 7403b32378476c8e8c666143dd7e0c3871904a60 /win/tclWinSerial.c | |
parent | 0ff016021c022c1f60500a200461fee9721b97e1 (diff) | |
parent | 39795a1da493f0ea91a228e768c0c656156ab340 (diff) | |
download | tcl-775e9aac009c6cd4a3cddbf67de9feac451f5662.zip tcl-775e9aac009c6cd4a3cddbf67de9feac451f5662.tar.gz tcl-775e9aac009c6cd4a3cddbf67de9feac451f5662.tar.bz2 |
Merge 8.7
Diffstat (limited to 'win/tclWinSerial.c')
-rw-r--r-- | win/tclWinSerial.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 0d0f5a8..e92b641 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -1302,7 +1302,7 @@ SerialWriterThread( buf = infoPtr->writeBuf; toWrite = infoPtr->toWrite; - myWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + myWrite.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); /* * Loop until all of the bytes are written or an error occurs. @@ -1414,7 +1414,7 @@ TclWinSerialOpen( * If an open channel is specified, close it */ - if ( handle != INVALID_HANDLE_VALUE && CloseHandle(handle) == FALSE) { + if (handle != INVALID_HANDLE_VALUE && CloseHandle(handle) == FALSE) { return INVALID_HANDLE_VALUE; } @@ -1424,7 +1424,7 @@ TclWinSerialOpen( * finished */ - handle = CreateFile(name, access, 0, 0, OPEN_EXISTING, + handle = CreateFileW(name, access, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); return handle; @@ -1497,15 +1497,15 @@ TclWinOpenSerialChannel( InitializeCriticalSection(&infoPtr->csWrite); if (permissions & TCL_READABLE) { - infoPtr->osRead.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + infoPtr->osRead.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); } if (permissions & TCL_WRITABLE) { /* * Initially the channel is writable and the writeThread is idle. */ - infoPtr->osWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - infoPtr->evWritable = CreateEvent(NULL, TRUE, TRUE, NULL); + infoPtr->osWrite.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + infoPtr->evWritable = CreateEventW(NULL, TRUE, TRUE, NULL); infoPtr->writeThread = CreateThread(NULL, 256, SerialWriterThread, TclPipeThreadCreateTI(&infoPtr->writeTI, infoPtr, infoPtr->evWritable), 0, NULL); @@ -1682,7 +1682,7 @@ SerialSetOptionProc( } Tcl_DStringInit(&ds); native = Tcl_UtfToWCharDString(value, -1, &ds); - result = BuildCommDCB(native, &dcb); + result = BuildCommDCBW(native, &dcb); Tcl_DStringFree(&ds); if (result == FALSE) { |