[TASKMGR] Fix display of process command-line string (#3016)

The CMD_LINE_CACHE index (idx) does not update when programs are closed.
Compare it with the process id (pid) in the cache and determine the pid
by the index in the same cache.

CORE-17115
This commit is contained in:
Aidan Case 2020-08-02 23:06:49 -05:00 committed by Stanislav Motylkov
parent 12186bec12
commit 535e262b78
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
2 changed files with 42 additions and 4 deletions

View file

@ -4,6 +4,7 @@
* perfdata.h
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
* Copyright (C) 2020 Aidan Case <aidanzcase@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -22,6 +23,7 @@
#pragma once
#include "windef.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -58,6 +60,7 @@ typedef struct _PERFDATA
typedef struct _CMD_LINE_CACHE
{
DWORD idx;
ULONG pid;
LPWSTR str;
ULONG len;
struct _CMD_LINE_CACHE* pnext;