Author: jimtabor
Date: Mon Aug 17 02:30:25 2009
New Revision: 42750
URL:
http://svn.reactos.org/svn/reactos?rev=42750&view=rev
Log:
- Add callback for client side thread startup. This is for bug 4785.
Modified:
trunk/reactos/dll/win32/user32/misc/dllmain.c
trunk/reactos/include/reactos/win32k/callback.h
trunk/reactos/subsystems/win32/win32k/include/callback.h
trunk/reactos/subsystems/win32/win32k/ntuser/callback.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c
Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Mon Aug 17 02:30:25 2009
@@ -232,6 +232,8 @@
(PVOID)User32CallEventProcFromKernel;
NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADMENU] =
(PVOID)User32CallLoadMenuFromKernel;
+ NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_CLIENTTHREADSTARTUP] =
+ (PVOID)User32CallClientThreadSetupFromKernel;
NtUserProcessConnect( NtCurrentProcess(),
&UserCon,
@@ -353,3 +355,12 @@
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
}
+
+NTSTATUS
+WINAPI
+User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength)
+{
+ ERR("GetConnected\n");
+ return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS);
+}
+
Modified: trunk/reactos/include/reactos/win32k/callback.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/cal…
==============================================================================
--- trunk/reactos/include/reactos/win32k/callback.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/callback.h [iso-8859-1] Mon Aug 17 02:30:25 2009
@@ -8,7 +8,8 @@
#define USER32_CALLBACK_HOOKPROC (4)
#define USER32_CALLBACK_EVENTPROC (5)
#define USER32_CALLBACK_LOADMENU (6)
-#define USER32_CALLBACK_MAXIMUM (6)
+#define USER32_CALLBACK_CLIENTTHREADSTARTUP (7)
+#define USER32_CALLBACK_MAXIMUM (7)
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
{
@@ -84,5 +85,7 @@
User32CallEventProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
NTSTATUS WINAPI
User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength);
+NTSTATUS WINAPI
+User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength);
#endif /* __INCLUDE_USER32_CALLBACK_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/callback.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/callback.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/callback.h [iso-8859-1] Mon Aug 17
02:30:25 2009
@@ -56,4 +56,6 @@
HMENU APIENTRY co_IntCallLoadMenu(HINSTANCE,PUNICODE_STRING);
+NTSTATUS APIENTRY co_IntClientThreadSetup(VOID);
+
#endif /* _WIN32K_CALLBACK_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/callback.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] Mon Aug 17
02:30:25 2009
@@ -703,4 +703,29 @@
return (HMENU)Result;
}
+NTSTATUS
+APIENTRY
+co_IntClientThreadSetup(VOID)
+{
+ NTSTATUS Status;
+ ULONG ArgumentLength, ResultLength;
+ PVOID Argument, ResultPointer;
+
+ ArgumentLength = ResultLength = 0;
+ Argument = ResultPointer = NULL;
+
+ UserLeaveCo();
+
+ Status = KeUserModeCallback(USER32_CALLBACK_CLIENTTHREADSTARTUP,
+ Argument,
+ ArgumentLength,
+ &ResultPointer,
+ &ResultLength);
+
+ UserEnterCo();
+
+ return Status;
+}
+
+
/* EOF */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] Mon Aug 17 02:30:25
2009
@@ -94,6 +94,8 @@
HANDLE hPowerRequestEvent,
HANDLE hMediaRequestEvent)
{
+ NTSTATUS Status;
+
// Set W32PF_Flags |= (W32PF_READSCREENACCESSGRANTED | W32PF_IOWINSTA)
// Create Object Directory,,, Looks like create workstation.
"\\Windows\\WindowStations"
// Create Event for Diconnect Desktop.
@@ -105,6 +107,15 @@
// Initialize User Screen.
// }
// Create ThreadInfo for this Thread!
+// {
+
+ GetW32ThreadInfo();
+
+// Callback to User32 Client Thread Setup
+
+ Status = co_IntClientThreadSetup();
+
+// }
// Set Global SERVERINFO Error flags.
// Load Resources.