Make SYSTEM_THREAD_INFORMATION.pszProcessName a UNICODE_STRING.

This commit is contained in:
Felix Nawothnig 2005-06-06 15:42:08 +00:00 committed by Alexandre Julliard
parent b402f04851
commit d8c5960ce1
2 changed files with 6 additions and 5 deletions

View File

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

View File

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