mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 19:59:49 +00:00
- 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:
parent
9fdb3933ab
commit
76ebb1bce7
|
@ -124,11 +124,6 @@ BOOL GdiIsHandleValid(HGDIOBJ hGdiObj)
|
||||||
|
|
||||||
BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, DWORD ObjectType, PVOID *UserData)
|
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);
|
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
|
||||||
if((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == ObjectType &&
|
if((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == ObjectType &&
|
||||||
( (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK ) ==
|
( (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK ) ==
|
||||||
|
@ -168,11 +163,6 @@ PLDC
|
||||||
FASTCALL
|
FASTCALL
|
||||||
GdiGetLDC(HDC hDC)
|
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;
|
PDC_ATTR Dc_Attr;
|
||||||
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX((HGDIOBJ) hDC);
|
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX((HGDIOBJ) hDC);
|
||||||
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
|
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
|
||||||
|
|
|
@ -331,11 +331,14 @@ FASTCALL
|
||||||
GetConnected(VOID)
|
GetConnected(VOID)
|
||||||
{
|
{
|
||||||
USERCONNECT UserCon;
|
USERCONNECT UserCon;
|
||||||
|
// ERR("GetConnected\n");
|
||||||
|
|
||||||
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
|
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
|
||||||
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
|
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
|
||||||
|
|
||||||
if (g_psi && g_ppi) return;
|
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(),
|
NtUserProcessConnect( NtCurrentProcess(),
|
||||||
&UserCon,
|
&UserCon,
|
||||||
|
@ -346,5 +349,4 @@ GetConnected(VOID)
|
||||||
g_psi = SharedPtrToUser(UserCon.siClient.psi);
|
g_psi = SharedPtrToUser(UserCon.siClient.psi);
|
||||||
gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
|
gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
|
||||||
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
|
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
|
||||||
// ERR("2 SI 0x%x : HT 0x%x : D 0x%x\n", UserCon.siClient.psi, UserCon.siClient.aheList, g_ulSharedDelta);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue