Author: greatlrd
Date: Wed Aug 1 01:41:15 2007
New Revision: 28058
URL:
http://svn.reactos.org/svn/reactos?rev=28058&view=rev
Log:
revers guiconsole.c changes that was mistake committed in r28057
Modified:
trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c Wed Aug 1 01:41:15 2007
@@ -139,8 +139,8 @@
hSubMenu = CreatePopupMenu();
if (hSubMenu != NULL)
{
- /*GuiConsoleAppendMenuItems(hSubMenu,
- Items[i].SubMenu);*/
+ GuiConsoleAppendMenuItems(hSubMenu,
+ Items[i].SubMenu);
if (!AppendMenuW(hMenu,
MF_STRING | MF_POPUP,
@@ -148,7 +148,6 @@
szMenuString))
{
DestroyMenu(hSubMenu);
- DPRINT1("DestroyMenu \n");
}
}
}
@@ -180,13 +179,8 @@
FALSE);
if (hMenu != NULL)
{
- DPRINT1("adding menu\n");
GuiConsoleAppendMenuItems(hMenu,
GuiConsoleMainMenuItems);
- }
- else
- {
- DPRINT1("This should never happen, GetSystemMenu == NULL \n");
}
}
@@ -242,12 +236,10 @@
RtlFreeUnicodeString(&SidName);
CloseHandle(hProcessToken);
- CloseHandle(hProcess);
-
- //if (hProcHandle)
- // *hProcHandle = hProcess;
- //else
- // CloseHandle(hProcess);
+ if (hProcHandle)
+ *hProcHandle = hProcess;
+ else
+ CloseHandle(hProcess);
if (res != ERROR_SUCCESS)
return FALSE;
@@ -284,26 +276,21 @@
DPRINT("GuiConsoleOpenUserSettings entered\n");
- DPRINT1("ProcessId %d\n",ProcessId);
-
if (!GuiConsoleOpenUserRegistryPathPerProcessId(ProcessId, &hProcess, &hKey,
samDesired))
{
- DPRINT1("GuiConsoleOpenUserRegistryPathPerProcessId failed\n");
+ DPRINT("GuiConsoleOpenUserRegistryPathPerProcessId failed\n");
return FALSE;
}
-
- hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, ProcessId
);
-
/* FIXME we do not getting the process name so no menu will be loading, why ?*/
fLength = GetProcessImageFileNameW(hProcess, szProcessName,
sizeof(GuiData->szProcessName) / sizeof(WCHAR));
CloseHandle(hProcess);
- DPRINT1("szProcessName3 : %S\n",szProcessName);
+ //DPRINT1("szProcessName3 : %S\n",szProcessName);
if (!fLength)
{
- DPRINT1("GetProcessImageFileNameW failed(0x%x)ProcessId %d\n",
GetLastError(),hProcess);
+ DPRINT("GetProcessImageFileNameW failed(0x%x)ProcessId %d\n",
GetLastError(),hProcess);
return FALSE;
}
/*
@@ -671,8 +658,6 @@
if (Console->ProcessList.Flink != &Console->ProcessList)
{
ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSRSS_PROCESS_DATA,
ProcessEntry);
- DPRINT1("PtrToUlong(ProcessData->ProcessId) ==
%d",PtrToUlong(ProcessData->ProcessId));
-
if (GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ProcessId),
&hKey, KEY_READ, FALSE))
{
GuiConsoleReadUserSettings(hKey, Console, GuiData, Console->ActiveBuffer);
@@ -1278,20 +1263,13 @@
{
PCSRSS_CONSOLE Console;
PGUI_CONSOLE_DATA GuiData;
- HMENU menu;
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
KillTimer(hWnd, 1);
Console->PrivateData = NULL;
DeleteCriticalSection(&GuiData->Lock);
-
- menu = GetSystemMenu(hWnd, TRUE);
- if (menu == NULL)
- {
- DPRINT1("This should never happen, GetSystemMenu == NULL \n");
- }
-
+ GetSystemMenu(hWnd, TRUE);
if (GuiData->ConsoleLibrary)
FreeLibrary(GuiData->ConsoleLibrary);