mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 07:26:20 +00:00
- add GDI_OBJECT_TYPE_PFE
- use own version of GdiQueryTable() instead of relying on gdi32.dll, as vista seems not to support it anymore svn path=/trunk/; revision=31222
This commit is contained in:
parent
541c17ddaa
commit
12096d19c4
3 changed files with 15 additions and 8 deletions
|
@ -48,6 +48,7 @@ typedef PGDI_TABLE_ENTRY (CALLBACK * GDIQUERYPROC) (void);
|
|||
#define GDI_OBJECT_TYPE_BITMAP 0x00050000
|
||||
#define GDI_OBJECT_TYPE_PALETTE 0x00080000
|
||||
#define GDI_OBJECT_TYPE_FONT 0x000a0000
|
||||
#define GDI_OBJECT_TYPE_PFE 0x000c0000
|
||||
#define GDI_OBJECT_TYPE_BRUSH 0x00100000
|
||||
#define GDI_OBJECT_TYPE_EMF 0x00210000
|
||||
#define GDI_OBJECT_TYPE_PEN 0x00300000
|
||||
|
|
|
@ -23,9 +23,17 @@
|
|||
#include "gdihv.h"
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
GDIQUERYPROC GdiQueryHandleTable;
|
||||
PGDI_TABLE_ENTRY GdiHandleTable = 0;
|
||||
|
||||
static
|
||||
PGDI_TABLE_ENTRY
|
||||
MyGdiQueryTable()
|
||||
{
|
||||
PTEB pTeb = NtCurrentTeb();
|
||||
PPEB pPeb = pTeb->ProcessEnvironmentBlock;
|
||||
return pPeb->GdiSharedHandleTable;
|
||||
}
|
||||
|
||||
int WINAPI WinMain (HINSTANCE hThisInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszArgument,
|
||||
|
@ -36,12 +44,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
|
||||
InitCommonControls();
|
||||
|
||||
GdiQueryHandleTable = (GDIQUERYPROC)GetProcAddress(GetModuleHandle(L"GDI32.DLL"), "GdiQueryTable");
|
||||
if(!GdiQueryHandleTable)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
GdiHandleTable = GdiQueryHandleTable();
|
||||
GdiHandleTable = MyGdiQueryTable();
|
||||
|
||||
DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_MAINWND), HWND_DESKTOP, MainWindow_WndProc, 0);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
|
|||
((ProcessId == (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) == 0)) )
|
||||
{
|
||||
if (ProcessId == (HANDLE)1 ||
|
||||
ProcessId == (HANDLE)((ULONG)pEntry->ProcessId & 0xfffc))
|
||||
((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc))
|
||||
{
|
||||
handle = GDI_HANDLE_CREATE(i, pEntry->Type);
|
||||
index = ListView_GetItemCount(hHandleListCtrl);
|
||||
|
@ -178,6 +178,9 @@ GetTypeName(HANDLE handle)
|
|||
case GDI_OBJECT_TYPE_DCE:
|
||||
strText = L"DCE";
|
||||
break;
|
||||
case GDI_OBJECT_TYPE_PFE:
|
||||
strText = L"PFE";
|
||||
break;
|
||||
case GDI_OBJECT_TYPE_DONTCARE:
|
||||
strText = L"anything";
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue