Author: jimtabor
Date: Fri Apr 3 09:26:53 2009
New Revision: 40340
URL:
http://svn.reactos.org/svn/reactos?rev=40340&view=rev
Log:
- Replaced fix pi and enabled test for window processes with the proper signing. Yes
regedit works.
Modified:
trunk/reactos/dll/win32/user32/include/user32.h
trunk/reactos/dll/win32/user32/misc/dllmain.c
trunk/reactos/dll/win32/user32/misc/misc.c
trunk/reactos/dll/win32/user32/windows/window.c
Modified: trunk/reactos/dll/win32/user32/include/user32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] Fri Apr 3 09:26:53 2009
@@ -48,6 +48,7 @@
LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
BOOL FASTCALL IsMetaFile(HDC);
+extern PPROCESSINFO g_ppi;
extern ULONG_PTR g_ulSharedDelta;
extern PSERVERINFO g_psi;
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] Fri Apr 3 09:26:53 2009
@@ -8,6 +8,7 @@
static ULONG User32TlsIndex;
HINSTANCE User32Instance;
+PPROCESSINFO g_ppi = NULL;
PUSER_HANDLE_TABLE gHandleTable = NULL;
PUSER_HANDLE_ENTRY gHandleEntries = NULL;
PSERVERINFO g_psi = NULL;
@@ -234,6 +235,7 @@
&UserCon,
sizeof(USERCONNECT));
+ g_ppi = GetWin32ClientInfo()->ppi; // Snapshot PI, used as pointer only!
g_ulSharedDelta = UserCon.siClient.ulSharedDelta;
g_psi = SharedPtrToUser(UserCon.siClient.psi);
gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
@@ -333,12 +335,13 @@
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
- if (g_psi) return;
+ if (g_psi && g_ppi) return;
NtUserProcessConnect( NtCurrentProcess(),
&UserCon,
sizeof(USERCONNECT));
+ g_ppi = GetWin32ClientInfo()->ppi;
g_ulSharedDelta = UserCon.siClient.ulSharedDelta;
g_psi = SharedPtrToUser(UserCon.siClient.psi);
gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
Modified: trunk/reactos/dll/win32/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/misc…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] Fri Apr 3 09:26:53 2009
@@ -431,7 +431,7 @@
ValidateCallProc(HANDLE hCallProc)
{
PCALLPROC CallProc = ValidateHandle(hCallProc, VALIDATE_TYPE_CALLPROC);
- if (CallProc != NULL && CallProc->pi == GetWin32ClientInfo()->ppi)
+ if (CallProc != NULL && CallProc->pi == g_ppi)
return CallProc;
return NULL;
Modified: trunk/reactos/dll/win32/user32/windows/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Fri Apr 3 09:26:53 2009
@@ -1126,8 +1126,7 @@
_SEH2_TRY
{
-// if (TestWindowProcess( Wnd))
- if (Wnd->pi != GetWin32ClientInfo()->ppi)
+ if (!TestWindowProcess( Wnd))
{
if (nMaxCount > 0)
{
@@ -1217,8 +1216,7 @@
_SEH2_TRY
{
-// if (TestWindowProcess( Wnd))
- if (Wnd->pi != GetWin32ClientInfo()->ppi)
+ if (!TestWindowProcess( Wnd))
{
if (nMaxCount > 0)
{