Author: tkreuzer
Date: Sat Dec 15 03:34:57 2007
New Revision: 31222
URL:
http://svn.reactos.org/svn/reactos?rev=31222&view=rev
Log:
- add GDI_OBJECT_TYPE_PFE
- use own version of GdiQueryTable() instead of relying on gdi32.dll, as vista seems not
to support it anymore
Modified:
trunk/rosapps/devutils/gdihv/gdi.h
trunk/rosapps/devutils/gdihv/gdihv.c
trunk/rosapps/devutils/gdihv/handlelist.c
Modified: trunk/rosapps/devutils/gdihv/gdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/gdihv/gdi.h?rev=3…
==============================================================================
--- trunk/rosapps/devutils/gdihv/gdi.h (original)
+++ trunk/rosapps/devutils/gdihv/gdi.h Sat Dec 15 03:34:57 2007
@@ -48,6 +48,7 @@
#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
Modified: trunk/rosapps/devutils/gdihv/gdihv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/gdihv/gdihv.c?rev…
==============================================================================
--- trunk/rosapps/devutils/gdihv/gdihv.c (original)
+++ trunk/rosapps/devutils/gdihv/gdihv.c Sat Dec 15 03:34:57 2007
@@ -23,8 +23,16 @@
#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,
@@ -36,12 +44,7 @@
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);
Modified: trunk/rosapps/devutils/gdihv/handlelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/gdihv/handlelist.…
==============================================================================
--- trunk/rosapps/devutils/gdihv/handlelist.c (original)
+++ trunk/rosapps/devutils/gdihv/handlelist.c Sat Dec 15 03:34:57 2007
@@ -86,7 +86,7 @@
((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 @@
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;