From 8b0bbbdc07cce6bac690d18366a912364847546b Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 7 Oct 2013 06:16:19 +0000 Subject: [PATCH] [PSAPI_APITEST] Complete the test (tested under w2k3) svn path=/trunk/; revision=60569 --- rostests/apitests/psapi/psapi.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/rostests/apitests/psapi/psapi.c b/rostests/apitests/psapi/psapi.c index 9cbf8ab0c1e..9634dfc60fc 100644 --- a/rostests/apitests/psapi/psapi.c +++ b/rostests/apitests/psapi/psapi.c @@ -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"); + } } -- 2.17.1