- Replaced fix pi and enabled test for window processes with the proper signing. Yes regedit works.

svn path=/trunk/; revision=40340
This commit is contained in:
James Tabor 2009-04-03 05:26:53 +00:00
parent 9f2a6c263e
commit 15c0d86086
4 changed files with 8 additions and 6 deletions

View file

@ -48,6 +48,7 @@ BOOL WINAPI NtGdiPatBlt(HDC hdcDst, INT x, INT y, INT cx, INT cy, DWORD rop4);
LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
BOOL FASTCALL IsMetaFile(HDC);
extern PPROCESSINFO g_ppi;
extern ULONG_PTR g_ulSharedDelta;
extern PSERVERINFO g_psi;

View file

@ -8,6 +8,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32);
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 @@ Init(VOID)
&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 @@ GetConnected(VOID)
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);

View file

@ -431,7 +431,7 @@ FASTCALL
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;

View file

@ -1126,8 +1126,7 @@ GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
_SEH2_TRY
{
// if (TestWindowProcess( Wnd))
if (Wnd->pi != GetWin32ClientInfo()->ppi)
if (!TestWindowProcess( Wnd))
{
if (nMaxCount > 0)
{
@ -1217,8 +1216,7 @@ GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
_SEH2_TRY
{
// if (TestWindowProcess( Wnd))
if (Wnd->pi != GetWin32ClientInfo()->ppi)
if (!TestWindowProcess( Wnd))
{
if (nMaxCount > 0)
{