diff --git a/reactos/dll/win32/gdi32/gdi32.rbuild b/reactos/dll/win32/gdi32/gdi32.rbuild
index fcabe1a77d2..643f4ea2fdf 100644
--- a/reactos/dll/win32/gdi32/gdi32.rbuild
+++ b/reactos/dll/win32/gdi32/gdi32.rbuild
@@ -9,6 +9,8 @@
ntdll
kernel32
advapi32
+ win32ksys
+
precomp.h
@@ -22,22 +24,7 @@
stubs.c
stubsa.c
stubsw.c
- wingl.c
-
-
- win32k.S
-
-
-
-
- win32k.S
-
-
-
-
- win32k.S
-
-
+ wingl.c
bitmap.c
diff --git a/reactos/dll/win32/user32/user32.rbuild b/reactos/dll/win32/user32/user32.rbuild
index fd1461143e5..4f0727ff96c 100644
--- a/reactos/dll/win32/user32/user32.rbuild
+++ b/reactos/dll/win32/user32/user32.rbuild
@@ -15,6 +15,8 @@
kernel32
advapi32
imm32
+ win32ksys
+
user32.h
@@ -46,21 +48,6 @@
winhelp.c
winsta.c
wsprintf.c
-
-
- win32k.S
-
-
-
-
- win32k.S
-
-
-
-
- win32k.S
-
-
accel.c
diff --git a/reactos/lib/lib.rbuild b/reactos/lib/lib.rbuild
index 753624e39d0..67f4bef5479 100644
--- a/reactos/lib/lib.rbuild
+++ b/reactos/lib/lib.rbuild
@@ -40,5 +40,9 @@
+
+
+
+
diff --git a/reactos/lib/win32ksys/win32ksys.rbuild b/reactos/lib/win32ksys/win32ksys.rbuild
new file mode 100644
index 00000000000..6d514898380
--- /dev/null
+++ b/reactos/lib/win32ksys/win32ksys.rbuild
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+ win32k.S
+
+
+
+
+ win32k.S
+
+
+
+
+ win32k.S
+
+
+
+
diff --git a/reactos/subsystems/win32/csrss/win32csr/guiconsole.c b/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
index bc7ec14a24b..6bf3f8e50be 100644
--- a/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
+++ b/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
@@ -139,8 +139,8 @@ GuiConsoleAppendMenuItems(HMENU hMenu,
hSubMenu = CreatePopupMenu();
if (hSubMenu != NULL)
{
- GuiConsoleAppendMenuItems(hSubMenu,
- Items[i].SubMenu);
+ /*GuiConsoleAppendMenuItems(hSubMenu,
+ Items[i].SubMenu);*/
if (!AppendMenuW(hMenu,
MF_STRING | MF_POPUP,
@@ -148,6 +148,7 @@ GuiConsoleAppendMenuItems(HMENU hMenu,
szMenuString))
{
DestroyMenu(hSubMenu);
+ DPRINT1("DestroyMenu \n");
}
}
}
@@ -179,9 +180,14 @@ GuiConsoleCreateSysMenu(PCSRSS_CONSOLE Console)
FALSE);
if (hMenu != NULL)
{
+ DPRINT1("adding menu\n");
GuiConsoleAppendMenuItems(hMenu,
GuiConsoleMainMenuItems);
}
+ else
+ {
+ DPRINT1("This should never happen, GetSystemMenu == NULL \n");
+ }
}
static VOID FASTCALL
@@ -236,10 +242,12 @@ GuiConsoleOpenUserRegistryPathPerProcessId(DWORD ProcessId, PHANDLE hProcHandle,
RtlFreeUnicodeString(&SidName);
CloseHandle(hProcessToken);
- if (hProcHandle)
- *hProcHandle = hProcess;
- else
- CloseHandle(hProcess);
+ CloseHandle(hProcess);
+
+ //if (hProcHandle)
+ // *hProcHandle = hProcess;
+ //else
+ // CloseHandle(hProcess);
if (res != ERROR_SUCCESS)
return FALSE;
@@ -276,21 +284,26 @@ GuiConsoleOpenUserSettings(PGUI_CONSOLE_DATA GuiData, DWORD ProcessId, PHKEY hSu
DPRINT("GuiConsoleOpenUserSettings entered\n");
+ DPRINT1("ProcessId %d\n",ProcessId);
+
if (!GuiConsoleOpenUserRegistryPathPerProcessId(ProcessId, &hProcess, &hKey, samDesired))
{
- DPRINT("GuiConsoleOpenUserRegistryPathPerProcessId failed\n");
+ DPRINT1("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)
{
- DPRINT("GetProcessImageFileNameW failed(0x%x)ProcessId %d\n", GetLastError(),hProcess);
+ DPRINT1("GetProcessImageFileNameW failed(0x%x)ProcessId %d\n", GetLastError(),hProcess);
return FALSE;
}
/*
@@ -658,6 +671,8 @@ GuiConsoleHandleNcCreate(HWND hWnd, CREATESTRUCTW *Create)
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);
@@ -1263,13 +1278,20 @@ GuiConsoleHandleNcDestroy(HWND hWnd)
{
PCSRSS_CONSOLE Console;
PGUI_CONSOLE_DATA GuiData;
+ HMENU menu;
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
KillTimer(hWnd, 1);
Console->PrivateData = NULL;
DeleteCriticalSection(&GuiData->Lock);
- GetSystemMenu(hWnd, TRUE);
+
+ menu = GetSystemMenu(hWnd, TRUE);
+ if (menu == NULL)
+ {
+ DPRINT1("This should never happen, GetSystemMenu == NULL \n");
+ }
+
if (GuiData->ConsoleLibrary)
FreeLibrary(GuiData->ConsoleLibrary);
diff --git a/reactos/tools/nci/nci.mak b/reactos/tools/nci/nci.mak
index 11b1e5cf8a0..80413e30a69 100644
--- a/reactos/tools/nci/nci.mak
+++ b/reactos/tools/nci/nci.mak
@@ -44,8 +44,9 @@ clean: nci_clean
# WIN32K.SYS
WIN32K_SVC_DB = subsystems$(SEP)win32$(SEP)win32k$(SEP)w32ksvc.db
WIN32K_SERVICE_TABLE = subsystems$(SEP)win32$(SEP)win32k$(SEP)include$(SEP)napi.h
-WIN32K_GDI_STUBS = dll$(SEP)win32$(SEP)gdi32$(SEP)misc$(SEP)$(ARCH)$(SEP)win32k.S
-WIN32K_USER_STUBS = dll$(SEP)win32$(SEP)user32$(SEP)misc$(SEP)$(ARCH)$(SEP)win32k.S
+WIN32K_GDI_STUBS = lib$(SEP)win32ksys$(SEP)$(ARCH)$(SEP)win32k.S
+WIN32K_USER_STUBS = lib$(SEP)win32ksys$(SEP)$(ARCH)$(SEP)win32k.S
+
# NTOSKRNL.EXE
@@ -69,6 +70,7 @@ $(NCI_SERVICE_FILES): $(NCI_TARGET) $(KERNEL_SVC_DB) $(WIN32K_SVC_DB)
${mkdir} dll$(SEP)win32$(SEP)gdi32$(SEP)misc$(SEP)$(ARCH) 2>$(NUL)
${mkdir} dll$(SEP)win32$(SEP)user32$(SEP)misc$(SEP)$(ARCH) 2>$(NUL)
${mkdir} lib$(SEP)win32ksys$(SEP)$(ARCH) 2>$(NUL)
+
$(Q)$(NCI_TARGET) -arch $(ARCH) \
$(KERNEL_SVC_DB) \
$(WIN32K_SVC_DB) \