[KERNEL32_APITEST]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 18 Apr 2015 21:30:15 +0000 (21:30 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 18 Apr 2015 21:30:15 +0000 (21:30 +0000)
Make PrivMoveFileIdentityW test work even if kernel32_apitest.exe isn't in current directory

svn path=/trunk/; revision=67278

rostests/apitests/kernel32/PrivMoveFileIdentityW.c

index f4270e0..9a33e9a 100644 (file)
@@ -13,7 +13,6 @@
 #include <ndk/rtltypes.h>
 
 static const WCHAR FileName[] = L"TestFile.xxx";
-static const WCHAR Self[] = L"kernel32_apitest.exe";
 
 static BOOL (WINAPI * pPrivMoveFileIdentityW)(LPCWSTR, LPCWSTR, DWORD);
 
@@ -61,9 +60,18 @@ TestPrivMoveFileIdentityW(VOID)
     LARGE_INTEGER CreationTime, EndOfFile;
     HANDLE hDest;
     NTSTATUS Status;
+    WCHAR Self[MAX_PATH];
 
     DeleteFileW(FileName);
 
+    if (GetModuleFileNameW(NULL, Self, MAX_PATH) == 0)
+    {
+        win_skip("Failed finding self\n");
+        return;
+    }
+
+    printf("%S\n", Self);
+
     if (!QueryFileInfo(Self, &FileBasicInfo, &FileStandardInfo))
     {
         win_skip("Failed querying self\n");