- Hack around the system start up Dll Initialization, this time we moved it to User32.

svn path=/trunk/; revision=41192
This commit is contained in:
James Tabor 2009-05-29 08:16:16 +00:00
parent 9fdb3933ab
commit 76ebb1bce7
2 changed files with 3 additions and 11 deletions

View file

@ -124,11 +124,6 @@ BOOL GdiIsHandleValid(HGDIOBJ hGdiObj)
BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, DWORD ObjectType, PVOID *UserData)
{
if ( !GdiHandleTable )
{
// FIXME HAX!! Due to the "Dll Initialization Bug" set the local handle table pointer.
GdiHandleTable = NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable;
}
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
if((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == ObjectType &&
( (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK ) ==
@ -168,11 +163,6 @@ PLDC
FASTCALL
GdiGetLDC(HDC hDC)
{
if ( !GdiHandleTable )
{
// FIXME HAX!! Due to the "Dll Initialization Bug" set the local handle table pointer.
GdiHandleTable = NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable;
}
PDC_ATTR Dc_Attr;
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX((HGDIOBJ) hDC);
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);

View file

@ -331,11 +331,14 @@ FASTCALL
GetConnected(VOID)
{
USERCONNECT UserCon;
// ERR("GetConnected\n");
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
if (g_psi && g_ppi) return;
// FIXME HAX: Due to the "Dll Initialization Bug" we have to call this too.
GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
NtUserProcessConnect( NtCurrentProcess(),
&UserCon,
@ -346,5 +349,4 @@ GetConnected(VOID)
g_psi = SharedPtrToUser(UserCon.siClient.psi);
gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
// ERR("2 SI 0x%x : HT 0x%x : D 0x%x\n", UserCon.siClient.psi, UserCon.siClient.aheList, g_ulSharedDelta);
}