From: Hartmut Birr Date: Tue, 7 May 2002 22:24:52 +0000 (+0000) Subject: Added basic support for console handles in DuplicateHandle. X-Git-Tag: backups/mpw@12443~26 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=deb8a30fce18bfb82d52adea1c63fa0dda4299f3 Added basic support for console handles in DuplicateHandle. svn path=/trunk/; revision=2923 --- diff --git a/reactos/lib/kernel32/misc/handle.c b/reactos/lib/kernel32/misc/handle.c index dc43a11c3c2..464b3622fee 100644 --- a/reactos/lib/kernel32/misc/handle.c +++ b/reactos/lib/kernel32/misc/handle.c @@ -1,4 +1,4 @@ -/* $Id: handle.c,v 1.5 2000/07/01 17:07:00 ea Exp $ +/* $Id: handle.c,v 1.6 2002/05/07 22:24:52 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -121,7 +121,20 @@ WINBOOL STDCALL DuplicateHandle(HANDLE hSourceProcessHandle, DWORD dwOptions) { NTSTATUS errCode; - + if (IsConsoleHandle(hSourceHandle)) + { + /* FIXME: call CSRSS for console handle duplication */ + if (hSourceProcessHandle == hTargetProcessHandle) + { + *lpTargetHandle = hSourceHandle; + return TRUE; + } + else + { + return FALSE; + } + } + errCode = NtDuplicateObject(hSourceProcessHandle, hSourceHandle, hTargetProcessHandle,