Author: mjansen
Date: Sat Jun  4 14:51:38 2016
New Revision: 71513

URL: http://svn.reactos.org/svn/reactos?rev=71513&view=rev
Log:
[APPSHIM_APITEST] Show a few shims that do not use hooks to function.

Modified:
    trunk/rostests/apitests/appshim/versionlie.c

Modified: trunk/rostests/apitests/appshim/versionlie.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/appshim/versionlie.c?rev=71513&r1=71512&r2=71513&view=diff
==============================================================================
--- trunk/rostests/apitests/appshim/versionlie.c        [iso-8859-1] (original)
+++ trunk/rostests/apitests/appshim/versionlie.c        [iso-8859-1] Sat Jun  4 
14:51:38 2016
@@ -279,6 +279,21 @@
     }
 }
 
+static void hookless_shim(LPCSTR shim)
+{
+    DWORD num_shims = 0;
+    WCHAR wide_shim[50] = { 0 };
+    PHOOKAPI hook;
+    MultiByteToWideChar(CP_ACP, 0, shim, -1, wide_shim, 50);
+    hook = pGetHookAPIs("", wide_shim, &num_shims);
+    if (hook == NULL)
+    {
+        skip("Skipping tests for layers (%s) not present in this os (0x%x)\n", 
shim, g_WinVersion);
+        return;
+    }
+    ok(hook != NULL, "Expected hook to be a valid pointer for %s\n", shim);
+    ok(num_shims == 0, "Expected not to find any apihooks, got: %u for %s\n", 
num_shims, shim);
+}
 
 VersionLieInfo g_Win95 = { 0xC3B60004, 4, 0, 950, VER_PLATFORM_WIN32_WINDOWS, 
0, 0 };
 VersionLieInfo g_WinNT4SP5 = { 0x05650004, 4, 0, 1381, VER_PLATFORM_WIN32_NT, 
5, 0 };
@@ -355,4 +370,8 @@
     run_test("VistaSP1VersionLie", &g_WinVistaSP1);
     run_test("VistaSP2VersionLie", &g_WinVistaSP2);
     run_test("Win7RTMVersionLie", &g_Win7RTM);
-}
+
+    hookless_shim("Force8BitColor");
+    hookless_shim("Force640x480");
+    hookless_shim("DisableThemes");
+}


Reply via email to