Author: jimtabor
Date: Fri May 29 12:16:16 2009
New Revision: 41192
URL:
http://svn.reactos.org/svn/reactos?rev=41192&view=rev
Log:
- Hack around the system start up Dll Initialization, this time we moved it to User32.
Modified:
trunk/reactos/dll/win32/gdi32/misc/misc.c
trunk/reactos/dll/win32/user32/misc/dllmain.c
Modified: trunk/reactos/dll/win32/gdi32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/misc.…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/misc/misc.c [iso-8859-1] Fri May 29 12:16:16 2009
@@ -124,11 +124,6 @@
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 @@
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);
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 May 29 12:16:16 2009
@@ -331,11 +331,14 @@
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 @@
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);
-}
+}