[SHIMENG] Find shims case-insensitive
[reactos.git] / modules / rostests / apitests / appshim / layer_hooks.c
index e47d9aa..1a0126b 100644 (file)
@@ -27,12 +27,24 @@ typedef struct expect_shim_data
 {
     const WCHAR* ShimName;
     DWORD MinVersion;
-    expect_shim_hook hooks[4];
+    expect_shim_hook hooks[6];
 } expect_shim_data;
 
 
 static expect_shim_data data[] =
 {
+    {
+        L"ForceDXSetupSuccess",
+        0,
+        {
+            { "KERNEL32.DLL", "LoadLibraryA" },
+            { "KERNEL32.DLL", "LoadLibraryW" },
+            { "KERNEL32.DLL", "LoadLibraryExA" },
+            { "KERNEL32.DLL", "LoadLibraryExW" },
+            { "KERNEL32.DLL", "GetProcAddress" },
+            { "KERNEL32.DLL", "FreeLibrary" },
+        }
+    },
     {
         L"VerifyVersionInfoLite",
         0,
@@ -41,6 +53,15 @@ static expect_shim_data data[] =
             { "KERNEL32.DLL", "VerifyVersionInfoW" },
         }
     },
+    /* Show that it is not case sensitive */
+    {
+        L"VeRiFyVeRsIoNInFoLiTe",
+        0,
+        {
+            { "KERNEL32.DLL", "VerifyVersionInfoA" },
+            { "KERNEL32.DLL", "VerifyVersionInfoW" },
+        }
+    },
 };
 
 static DWORD count_shims(expect_shim_data* data)
@@ -61,7 +82,7 @@ static const char* safe_str(const char* ptr)
         return ptr;
 
     index ^= 1;
-    StringCchPrintfA(buffer[index], _countof(buffer[index]), "#%d", (int)ptr);
+    StringCchPrintfA(buffer[index], _countof(buffer[index]), "#%Id", (intptr_t)ptr);
     return buffer[index];
 }