/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Console Driver DLL
- * FILE: consrv/condrv/graphics.c
+ * FILE: win32ss/user/winsrv/consrv/condrv/graphics.c
* PURPOSE: Console Output Functions for graphics-mode screen-buffers
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*
if (!NT_SUCCESS(Status))
{
DPRINT1("Error: Impossible to create a shared section, Status = 0x%08lx\n", Status);
- NtClose(NewBuffer->ClientMutex);
+ NtDuplicateObject(ProcessHandle, NewBuffer->ClientMutex,
+ NULL, NULL, 0, 0, DUPLICATE_CLOSE_SOURCE);
NtClose(NewBuffer->Mutex);
ConsoleFreeHeap(NewBuffer->BitMapInfo);
CONSOLE_SCREEN_BUFFER_Destroy((PCONSOLE_SCREEN_BUFFER)NewBuffer);
{
DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status);
NtClose(NewBuffer->hSection);
- NtClose(NewBuffer->ClientMutex);
+ NtDuplicateObject(ProcessHandle, NewBuffer->ClientMutex,
+ NULL, NULL, 0, 0, DUPLICATE_CLOSE_SOURCE);
NtClose(NewBuffer->Mutex);
ConsoleFreeHeap(NewBuffer->BitMapInfo);
CONSOLE_SCREEN_BUFFER_Destroy((PCONSOLE_SCREEN_BUFFER)NewBuffer);
DPRINT1("Error: Impossible to map the shared section, Status = 0x%08lx\n", Status);
NtUnmapViewOfSection(NtCurrentProcess(), NewBuffer->BitMap);
NtClose(NewBuffer->hSection);
- NtClose(NewBuffer->ClientMutex);
+ NtDuplicateObject(ProcessHandle, NewBuffer->ClientMutex,
+ NULL, NULL, 0, 0, DUPLICATE_CLOSE_SOURCE);
NtClose(NewBuffer->Mutex);
ConsoleFreeHeap(NewBuffer->BitMapInfo);
CONSOLE_SCREEN_BUFFER_Destroy((PCONSOLE_SCREEN_BUFFER)NewBuffer);
NtUnmapViewOfSection(Buff->ClientProcess, Buff->ClientBitMap);
NtUnmapViewOfSection(NtCurrentProcess(), Buff->BitMap);
NtClose(Buff->hSection);
- NtClose(Buff->ClientMutex);
+ NtDuplicateObject(Buff->ClientProcess, Buff->ClientMutex,
+ NULL, NULL, 0, 0, DUPLICATE_CLOSE_SOURCE);
NtClose(Buff->Mutex);
ConsoleFreeHeap(Buff->BitMapInfo);