[PSAPI_APITEST]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 7 Oct 2013 06:16:19 +0000 (06:16 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 7 Oct 2013 06:16:19 +0000 (06:16 +0000)
Complete the test (tested under w2k3)

svn path=/trunk/; revision=60569

rostests/apitests/psapi/psapi.c

index 9cbf8ab..9634dfc 100644 (file)
@@ -125,4 +125,28 @@ START_TEST(GetDeviceDriverFileName)
     {
         skip("Couldn't find info about ntdll.dll\n");
     }
+
+    if (IntGetModuleInformation("msvcrt.dll", FALSE, TRUE, &ModInfo))
+    {
+        SetLastError(0xDEADBEEF);
+        Len = GetDeviceDriverFileNameA(ModInfo.ImageBase, FileName, 255);
+        ok(Len == 0, "Len: %lu\n", Len);
+        ok(GetLastError() == ERROR_INVALID_HANDLE, "Error: %lx\n", GetLastError());
+    }
+    else
+    {
+        skip("Couldn't find info about msvcrt.dll\n");
+    }
+
+    if (IntGetModuleInformation("psapi.dll", FALSE, TRUE, &ModInfo))
+    {
+        SetLastError(0xDEADBEEF);
+        Len = GetDeviceDriverFileNameA(ModInfo.ImageBase, FileName, 255);
+        ok(Len == 0, "Len: %lu\n", Len);
+        ok(GetLastError() == ERROR_INVALID_HANDLE, "Error: %lx\n", GetLastError());
+    }
+    else
+    {
+        skip("Couldn't find info about psapi.dll\n");
+    }
 }