[PATCH v2 1/3] ntdll: Implement ProcessImageFileNameWin32 in NtQueryInformationProcess.

Zebediah Figura z.figura12 at gmail.com
Thu Mar 1 18:16:03 CST 2018


From: Michael Müller <michael at fds-team.de>

This patch allows Process Hacker to show the filename, icon and description of an executable.

Since ProcessImageFileName incorrectly returns a Win32 path, we can simply reuse the existing implementation.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
v2: update comment

 dlls/ntdll/process.c | 4 ++--
 include/winternl.h   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 835d7e6..b299287 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -515,8 +515,8 @@ NTSTATUS WINAPI NtQueryInformationProcess(
         }
         break;
     case ProcessImageFileName:
-        /* FIXME: this will return a DOS path. Windows returns an NT path. Changing this would require also changing kernel32.QueryFullProcessImageName.
-         * The latter may be harder because of the lack of RtlNtPathNameToDosPathName. */
+        /* FIXME: Should return a device path */
+    case ProcessImageFileNameWin32:
         SERVER_START_REQ(get_dll_info)
         {
             UNICODE_STRING *image_file_name_str = ProcessInformation;
diff --git a/include/winternl.h b/include/winternl.h
index c3cca80..f72a071 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -853,6 +853,7 @@ typedef enum _PROCESSINFOCLASS {
     ProcessDebugFlags = 31,
     ProcessHandleTracing = 32,
     ProcessExecuteFlags = 34,
+    ProcessImageFileNameWin32 = 43,
     MaxProcessInfoClass
 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
 
-- 
2.7.4




More information about the wine-devel mailing list