diff --git a/rostests/apitests/gdi32api/gdi32api.c b/rostests/apitests/gdi32api/gdi32api.c index 000fa2bbacc..e0743f957a7 100644 --- a/rostests/apitests/gdi32api/gdi32api.c +++ b/rostests/apitests/gdi32api/gdi32api.c @@ -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"); } diff --git a/rostests/apitests/gdi32api/gdi32api.h b/rostests/apitests/gdi32api/gdi32api.h index c5d7db2a89e..0693d1b30be 100644 --- a/rostests/apitests/gdi32api/gdi32api.h +++ b/rostests/apitests/gdi32api/gdi32api.h @@ -5,6 +5,7 @@ #include "gdi.h" extern HINSTANCE g_hInstance; +extern PGDI_TABLE_ENTRY GdiHandleTable; #endif /* _GDITEST_H */