- rename ASSERT1 to ASSERT
[reactos.git] / rostests / apitests / w32knapi / w32knapi.c
index d031bb6..32837aa 100644 (file)
@@ -2,6 +2,7 @@
 \r
 HINSTANCE g_hInstance;\r
 HMODULE g_hModule = NULL;\r
+PGDI_TABLE_ENTRY GdiHandleTable;\r
 \r
 static DWORD STDCALL\r
 IntSyscall(FARPROC proc, UINT cParams, PVOID pFirstParam)\r
@@ -58,7 +59,8 @@ WinMain(HINSTANCE hInstance,
         int       nCmdShow)\r
 {\r
        g_hInstance = hInstance;\r
-       \r
+       GDIQUERYPROC GdiQueryHandleTable;\r
+\r
        printf("Win32k native API test\n");\r
 \r
        /* Convert to gui thread */\r
@@ -68,7 +70,18 @@ WinMain(HINSTANCE hInstance,
        if (!g_hModule)\r
        {\r
                printf("w32kdll.dll not found!\n");\r
-               return FALSE;\r
+               return -1;\r
+       }\r
+\r
+       GdiQueryHandleTable = (GDIQUERYPROC)GetProcAddress(GetModuleHandleW(L"GDI32.DLL"), "GdiQueryTable");\r
+       if(!GdiQueryHandleTable)\r
+       {\r
+               return -1;\r
+       }\r
+       GdiHandleTable = GdiQueryHandleTable();\r
+       if(!GdiHandleTable)\r
+       {\r
+               return -1;\r
        }\r
 \r
        printf("\n");\r