From eeb356567babde6834b8089883150f038b694765 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Thu, 25 Apr 2002 23:00:45 +0000 Subject: [PATCH] Added support for TransmitCommChar. --- dlls/kernel/comm.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/kernel/comm.c b/dlls/kernel/comm.c index c8a20e2adad..ef2c2570792 100644 --- a/dlls/kernel/comm.c +++ b/dlls/kernel/comm.c @@ -1435,10 +1435,24 @@ BOOL WINAPI TransmitCommChar( HANDLE hComm, /* [in] The communication device in need of a command character. */ CHAR chTransmit) /* [in] The character to transmit. */ { - FIXME("(%x,'%c'), stub ! Use win32 handle!\n",hComm,chTransmit); - return TRUE; + BOOL r = FALSE; + int fd; + + WARN("(%x,'%c') not perfect!\n",hComm,chTransmit); + + fd = FILE_GetUnixHandle( hComm, GENERIC_READ ); + if ( fd < 0 ) + SetLastError ( ERROR_INVALID_PARAMETER ); + else + { + r = (1 == write(fd, &chTransmit, 1)); + close(fd); + } + + return r; } + /***************************************************************************** * GetCommTimeouts (KERNEL32.@) *