Query the gdi handle table for later use in tests

svn path=/trunk/; revision=30848
This commit is contained in:
Timo Kreuzer 2007-11-28 23:41:11 +00:00
parent 86962e6878
commit 3ac4bd2b4f
2 changed files with 16 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#include "gdi32api.h"
HINSTANCE g_hInstance;
PGDI_TABLE_ENTRY GdiHandleTable;
BOOL
IsFunctionPresent(LPWSTR lpszFunction)
@ -14,6 +15,20 @@ WinMain(HINSTANCE hInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
GDIQUERYPROC GdiQueryTable;
g_hInstance = hInstance;
GdiQueryTable = (GDIQUERYPROC)GetProcAddress(GetModuleHandleW(L"GDI32.DLL"), "GdiQueryTable");
if(!GdiQueryTable)
{
return -1;
}
GdiHandleTable = GdiQueryTable();
if(!GdiHandleTable)
{
return -1;
}
return TestMain(L"gdi32api", L"gdi32.dll");
}

View file

@ -5,6 +5,7 @@
#include "gdi.h"
extern HINSTANCE g_hInstance;
extern PGDI_TABLE_ENTRY GdiHandleTable;
#endif /* _GDITEST_H */