diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index efcba6cae8b..5d5126ce8f8 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -760,9 +760,11 @@ NTSTATUS WINAPI NtQuerySystemInformation( if (ret == STATUS_NO_MORE_FILES) ret = STATUS_SUCCESS; /* now append process name */ - spi->pszProcessName = (WCHAR*)((char*)spi + spi->dwOffset); - memcpy( spi->pszProcessName, procname, wlen - sizeof(WCHAR) ); - spi->pszProcessName[wlen / sizeof(WCHAR)] = 0; + spi->ProcessName.Buffer = (WCHAR*)((char*)spi + spi->dwOffset); + spi->ProcessName.Length = wlen - sizeof(WCHAR); + spi->ProcessName.MaximumLength = wlen; + memcpy( spi->ProcessName.Buffer, procname, spi->ProcessName.Length ); + spi->ProcessName.Buffer[spi->ProcessName.Length / sizeof(WCHAR)] = 0; len += wlen; spi->dwOffset += wlen; diff --git a/include/winternl.h b/include/winternl.h index 93f93641fe1..cd77ee87348 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1082,8 +1082,7 @@ typedef struct _SYSTEM_PROCESS_INFORMATION { FILETIME ftCreationTime; FILETIME ftUserTime; FILETIME ftKernelTime; - DWORD dwUnknown2; - WCHAR *pszProcessName; + UNICODE_STRING ProcessName; DWORD dwBasePriority; DWORD dwProcessID; DWORD dwParentProcessID;