ntdll: Implement ProcessImageFileNameWin32 in NtQueryInformationProcess.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2018-03-04 10:20:04 -06:00 committed by Alexandre Julliard
parent 9be6ff403d
commit 69029d70f6
3 changed files with 21 additions and 8 deletions

View file

@ -3501,16 +3501,16 @@ static void test_process_info(void)
sizeof(buf) /* ProcessHandleTracing */,
sizeof(ULONG) /* ProcessIoPriority */,
sizeof(ULONG) /* ProcessExecuteFlags */,
#if 0 /* FIXME: Add remaining classes */
ProcessResourceManagement,
sizeof(ULONG) /* ProcessCookie */,
0 /* FIXME: sizeof(?) ProcessTlsInformation */,
0 /* FIXME: sizeof(?) ProcessCookie */,
sizeof(SECTION_IMAGE_INFORMATION) /* ProcessImageInformation */,
sizeof(PROCESS_CYCLE_TIME_INFORMATION) /* ProcessCycleTime */,
0 /* FIXME: sizeof(PROCESS_CYCLE_TIME_INFORMATION) ProcessCycleTime */,
sizeof(ULONG) /* ProcessPagePriority */,
40 /* ProcessInstrumentationCallback */,
sizeof(PROCESS_STACK_ALLOCATION_INFORMATION) /* ProcessThreadStackAllocation */,
sizeof(PROCESS_WS_WATCH_INFORMATION_EX[]) /* ProcessWorkingSetWatchEx */,
0 /* FIXME: sizeof(PROCESS_STACK_ALLOCATION_INFORMATION) ProcessThreadStackAllocation */,
0 /* FIXME: sizeof(PROCESS_WS_WATCH_INFORMATION_EX[]) ProcessWorkingSetWatchEx */,
sizeof(buf) /* ProcessImageFileNameWin32 */,
#if 0 /* FIXME: Add remaining classes */
sizeof(HANDLE) /* ProcessImageFileMapping */,
sizeof(PROCESS_AFFINITY_UPDATE_MODE) /* ProcessAffinityUpdateMode */,
sizeof(PROCESS_MEMORY_ALLOCATION_MODE) /* ProcessMemoryAllocationMode */,
@ -3582,6 +3582,9 @@ static void test_process_info(void)
case ProcessDefaultHardErrorMode:
case ProcessHandleCount:
case ProcessImageFileName:
case ProcessImageInformation:
case ProcessPagePriority:
case ProcessImageFileNameWin32:
ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len);
break;
@ -3599,6 +3602,7 @@ static void test_process_info(void)
case ProcessExecuteFlags:
case ProcessDebugPort:
case ProcessDebugFlags:
case ProcessCookie:
todo_wine
ok(status == STATUS_ACCESS_DENIED, "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len);
break;

View file

@ -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;

View file

@ -853,6 +853,15 @@ typedef enum _PROCESSINFOCLASS {
ProcessDebugFlags = 31,
ProcessHandleTracing = 32,
ProcessExecuteFlags = 34,
ProcessTlsInformation = 35,
ProcessCookie = 36,
ProcessImageInformation = 37,
ProcessCycleTime = 38,
ProcessPagePriority = 39,
ProcessInstrumentationCallback = 40,
ProcessThreadStackAllocation = 41,
ProcessWorkingSetWatchEx = 42,
ProcessImageFileNameWin32 = 43,
MaxProcessInfoClass
} PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;