ReactOS  0.4.15-dev-4863-gba0d16f
procpage.c File Reference
#include "precomp.h"
#include "proclist.h"
#include <strsafe.h>
#include <ndk/psfuncs.h>
Include dependency graph for procpage.c:

Go to the source code of this file.

Classes

struct  PROCESS_PAGE_LIST_ITEM
 

Macros

#define CMP(x1, x2)   (x1 < x2 ? -1 : (x1 > x2 ? 1 : 0))
 

Typedefs

typedef struct PROCESS_PAGE_LIST_ITEMLPPROCESS_PAGE_LIST_ITEM
 

Functions

int CALLBACK ProcessPageCompareFunc (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
 
void AddProcess (ULONG Index)
 
void UpdateProcesses ()
 
void gethmsfromlargeint (LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds)
 
void ProcessPageOnNotify (WPARAM wParam, LPARAM lParam)
 
void CommaSeparateNumberString (LPWSTR strNumber, ULONG nMaxCount)
 
void ProcessPageShowContextMenu (DWORD dwProcessId)
 
BOOL PerfDataGetText (ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount)
 
DWORD WINAPI ProcessPageRefreshThread (void *lpParameter)
 
int ProcessRunning (ULONG ProcessId)
 
void Cleanup (void)
 
int ProcGetIndexByProcessId (DWORD dwProcessId)
 
DWORD GetSelectedProcessId (void)
 
void ProcessPageUpdate (void)
 
INT_PTR CALLBACK ProcessPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
void RefreshProcessPage (void)
 
int largeintcmp (LARGE_INTEGER l1, LARGE_INTEGER l2)
 
static DWORD DevicePathToDosPath (_In_ LPCWSTR lpDevicePath, _Out_writes_to_opt_(dwLength, return) LPWSTR lpDosPath, _In_opt_ DWORD dwLength)
 Maps an NT "\Device\..." path to its Win32 "DOS" equivalent. More...
 
static DWORD GetProcessExecutablePath (_In_ HANDLE hProcess, _Out_writes_to_opt_(dwLength, return) LPWSTR lpExePath, _In_opt_ DWORD dwLength)
 Retrieves the Win32 path of an executable image, by handle. More...
 
static DWORD GetProcessExecutablePathById (_In_ DWORD dwProcessId, _Out_writes_to_opt_(dwLength, return) LPWSTR lpExePath, _In_opt_ DWORD dwLength)
 Retrieves the Win32 path of an executable image, by identifier. More...
 
void ProcessPage_OnProperties (void)
 
void ProcessPage_OnOpenFileLocation (void)
 

Variables

HWND hProcessPage
 
HWND hProcessPageListCtrl
 
HWND hProcessPageHeaderCtrl
 
HWND hProcessPageEndProcessButton
 
HWND hProcessPageShowAllProcessesButton
 
BOOL bProcessPageSelectionMade = FALSE
 
static int nProcessPageWidth
 
static int nProcessPageHeight
 
static HANDLE hProcessThread = NULL
 
static DWORD dwProcessThread
 

Macro Definition Documentation

◆ CMP

#define CMP (   x1,
  x2 
)    (x1 < x2 ? -1 : (x1 > x2 ? 1 : 0))

Definition at line 33 of file procpage.c.

Typedef Documentation

◆ LPPROCESS_PAGE_LIST_ITEM

Function Documentation

◆ AddProcess()

void AddProcess ( ULONG  Index)

Definition at line 523 of file procpage.c.

524 {
526  int i;
527  LV_ITEM item;
528  BOOL bAlreadyInList = FALSE;
529  ULONG pid;
530 
532 
533  /* Check to see if it's already in our list */
535  {
536  memset(&item, 0, sizeof(LV_ITEM));
537  item.mask = LVIF_PARAM;
538  item.iItem = i;
541  if (pData->ProcessId == pid)
542  {
543  bAlreadyInList = TRUE;
544  break;
545  }
546  }
547  if (!bAlreadyInList) /* Add */
548  {
550  pData->ProcessId = pid;
551 
552  /* Add the item to the list */
553  memset(&item, 0, sizeof(LV_ITEM));
554  item.mask = LVIF_TEXT|LVIF_PARAM;
555  item.pszText = LPSTR_TEXTCALLBACK;
557  item.lParam = (LPARAM)pData;
559  }
560 }
#define LV_ITEM
Definition: commctrl.h:2337
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define TRUE
Definition: types.h:120
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2408
if(dx==0 &&dy==0)
Definition: linetemp.h:174
#define LVIF_TEXT
Definition: commctrl.h:2309
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef.h:208
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_In_ WDFCOLLECTION _In_ ULONG Index
ULONG PerfDataGetProcessId(ULONG Index)
Definition: perfdata.c:506
static ATOM item
Definition: dde.c:856
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define LVIF_PARAM
Definition: commctrl.h:2311
unsigned int ULONG
Definition: retypes.h:1
#define LPSTR_TEXTCALLBACK
Definition: commctrl.h:2383
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:43

Referenced by UpdateProcesses().

◆ Cleanup()

void Cleanup ( void  )

Definition at line 67 of file procpage.c.

68 {
69  int i;
70  LV_ITEM item;
73  {
74  memset(&item, 0, sizeof(LV_ITEM));
75  item.mask = LVIF_PARAM;
76  item.iItem = i;
80  }
81 }
#define LV_ITEM
Definition: commctrl.h:2337
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
#define GetProcessHeap()
Definition: compat.h:595
static ATOM item
Definition: dde.c:856
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define LVIF_PARAM
Definition: commctrl.h:2311
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:43
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by GetProcessExecutablePath(), ProcessPage_OnOpenFileLocation(), ProcessPage_OnProperties(), and ProcessPageWndProc().

◆ CommaSeparateNumberString()

void CommaSeparateNumberString ( LPWSTR  strNumber,
ULONG  nMaxCount 
)

Definition at line 327 of file procpage.c.

328 {
329  WCHAR temp[260];
330  UINT i, j, k;
331 
332  for (i=0,j=0; i<(wcslen(strNumber) % 3); i++, j++)
333  temp[j] = strNumber[i];
334  for (k=0; i<wcslen(strNumber); i++,j++,k++) {
335  if ((k % 3 == 0) && (j > 0))
336  temp[j++] = L',';
337  temp[j] = strNumber[i];
338  }
339  temp[j] = L'\0';
340  wcsncpy(strNumber, temp, nMaxCount);
341 }
#define L(x)
Definition: ntvdm.h:50
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static calc_node_t temp
Definition: rpn_ieee.c:38
unsigned int UINT
Definition: ndis.h:50
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ int nMaxCount
Definition: winuser.h:4857
int k
Definition: mpi.c:3369

Referenced by PerfDataGetText().

◆ DevicePathToDosPath()

static DWORD DevicePathToDosPath ( _In_ LPCWSTR  lpDevicePath,
_Out_writes_to_opt_(dwLength, return) LPWSTR  lpDosPath,
_In_opt_ DWORD  dwLength 
)
static

Maps an NT "\Device\..." path to its Win32 "DOS" equivalent.

Parameters
[in]lpDevicePathThe NT device path to convert.
[out]lpDosPathReceives the converted Win32 path.
[in]dwLengthSize of the lpDosPath buffer in characters.
Returns
The number of characters required (if lpDosPath == NULL or dwLength == 0), or actually written in the lpDosPath buffer, including the NULL terminator. Returns 0 in case of failure.

Definition at line 959 of file procpage.c.

964 {
965  DWORD dwRet = 0;
966  WCHAR szDrive[3] = L"?:";
968 
969  /* Check if lpDevicePath is a device path */
970  if (_wcsnicmp(lpDevicePath, L"\\Device\\", _countof(L"\\Device\\")-1) != 0)
971  {
972  return 0;
973  }
974 
975  for (szDrive[0] = L'A'; szDrive[0] <= L'`'; szDrive[0]++)
976  {
977  if (QueryDosDeviceW(szDrive, szDeviceName, _countof(szDeviceName)) != 0)
978  {
979  size_t len = wcslen(szDeviceName);
980 
981  if (_wcsnicmp(lpDevicePath, szDeviceName, len) == 0)
982  {
983  /* Get the required length, including the NULL terminator */
984  dwRet = _countof(szDrive) + wcslen(lpDevicePath + len);
985 
986  if (lpDosPath && (dwLength >= dwRet))
987  {
988  StringCchPrintfW(lpDosPath, dwLength, L"%s%s",
989  szDrive, lpDevicePath + len);
990  }
991 
992  break;
993  }
994  }
995  }
996 
997  return dwRet;
998 }
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define L(x)
Definition: ntvdm.h:50
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
Definition: dosdev.c:542
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:85
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
static const WCHAR szDeviceName[]
Definition: provider.c:56
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by GetProcessExecutablePath().

◆ gethmsfromlargeint()

void gethmsfromlargeint ( LARGE_INTEGER  largeint,
DWORD dwHours,
DWORD dwMinutes,
DWORD dwSeconds 
)

Definition at line 704 of file procpage.c.

705 {
706 #ifdef _MSC_VER
707  *dwHours = (DWORD)(largeint.QuadPart / 36000000000L);
708  *dwMinutes = (DWORD)((largeint.QuadPart % 36000000000L) / 600000000L);
709  *dwSeconds = (DWORD)(((largeint.QuadPart % 36000000000L) % 600000000L) / 10000000L);
710 #else
711  *dwHours = (DWORD)(largeint.QuadPart / 36000000000LL);
712  *dwMinutes = (DWORD)((largeint.QuadPart % 36000000000LL) / 600000000LL);
713  *dwSeconds = (DWORD)(((largeint.QuadPart % 36000000000LL) % 600000000LL) / 10000000LL);
714 #endif
715 }
#define LL
Definition: tui.h:150
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by largeintcmp(), and PerfDataGetText().

◆ GetProcessExecutablePath()

static DWORD GetProcessExecutablePath ( _In_ HANDLE  hProcess,
_Out_writes_to_opt_(dwLength, return) LPWSTR  lpExePath,
_In_opt_ DWORD  dwLength 
)
static

Retrieves the Win32 path of an executable image, by handle.

Parameters
[in]hProcessHandle to the executable image; it should be opened with PROCESS_QUERY_INFORMATION access rights.
[out]lpExePathReceives the Win32 image path.
[in]dwLengthSize of the lpExePath buffer in characters.
Returns
The number of characters required (if lpExePath == NULL or dwLength == 0), or actually written in the lpExePath buffer, including the NULL terminator. Returns 0 in case of failure.

Definition at line 1020 of file procpage.c.

1025 {
1026  DWORD dwRet = 0;
1027  NTSTATUS Status;
1028  BYTE StaticBuffer[sizeof(UNICODE_STRING) + (MAX_PATH * sizeof(WCHAR))];
1030  PUNICODE_STRING ExePath;
1031  ULONG SizeNeeded;
1032 
1035  StaticBuffer,
1036  /* Reserve a NULL terminator */
1037  sizeof(StaticBuffer) - sizeof(WCHAR),
1038  &SizeNeeded);
1039  if (NT_SUCCESS(Status))
1040  {
1041  ExePath = (PUNICODE_STRING)StaticBuffer;
1042  }
1043  else if (Status == STATUS_INFO_LENGTH_MISMATCH)
1044  {
1045  /* Allocate the buffer, reserving space for a NULL terminator */
1046  DynamicBuffer = HeapAlloc(GetProcessHeap(), 0, SizeNeeded + sizeof(WCHAR));
1047  if (!DynamicBuffer)
1048  return 0;
1049 
1052  DynamicBuffer,
1053  SizeNeeded,
1054  &SizeNeeded);
1055  if (!NT_SUCCESS(Status))
1056  goto Cleanup;
1057 
1058  ExePath = DynamicBuffer;
1059  }
1060  else
1061  {
1062  return 0;
1063  }
1064 
1065  /* Manually NULL-terminate */
1066  ExePath->Buffer[ExePath->Length / sizeof(WCHAR)] = UNICODE_NULL;
1067 
1068  /* HACK: Convert device path format into Win32 path format.
1069  * Use ProcessImageFileNameWin32 instead if the kernel supports it. */
1070  dwRet = DevicePathToDosPath(ExePath->Buffer, lpExePath, dwLength);
1071 
1072 Cleanup:
1074 
1075  return dwRet;
1076 }
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
LONG NTSTATUS
Definition: precomp.h:26
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
static DWORD DevicePathToDosPath(_In_ LPCWSTR lpDevicePath, _Out_writes_to_opt_(dwLength, return) LPWSTR lpDosPath, _In_opt_ DWORD dwLength)
Maps an NT "\Device\..." path to its Win32 "DOS" equivalent.
Definition: procpage.c:959
void Cleanup(void)
Definition: procpage.c:67
#define UNICODE_NULL
Status
Definition: gdiplustypes.h:24
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:85
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned char BYTE
Definition: xxhash.c:193
#define NULL
Definition: types.h:112
UNICODE_STRING * PUNICODE_STRING
Definition: env_spec_w32.h:373
struct _UNICODE_STRING UNICODE_STRING
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
Definition: query.c:59

Referenced by GetProcessExecutablePathById().

◆ GetProcessExecutablePathById()

static DWORD GetProcessExecutablePathById ( _In_ DWORD  dwProcessId,
_Out_writes_to_opt_(dwLength, return) LPWSTR  lpExePath,
_In_opt_ DWORD  dwLength 
)
static

Retrieves the Win32 path of an executable image, by identifier.

Parameters
[in]dwProcessIdIdentifier of the running executable image.
[out]lpExePathReceives the Win32 image path.
[in]dwLengthSize of the lpExePath buffer in characters.
Returns
The number of characters required (if lpExePath == NULL or dwLength == 0), or actually written in the lpExePath buffer, including the NULL terminator. Returns 0 in case of failure.

Definition at line 1097 of file procpage.c.

1102 {
1103  DWORD dwRet = 0;
1104 
1105  if (dwProcessId == 0)
1106  return 0;
1107 
1108  /* PID = 4 ("System") */
1109  if (dwProcessId == 4)
1110  {
1111  static const WCHAR szKernelExe[] = L"\\ntoskrnl.exe";
1112  LPWSTR pszSystemDir;
1113  UINT uLength;
1114 
1115  uLength = GetSystemDirectoryW(NULL, 0);
1116  if (uLength == 0)
1117  return 0;
1118 
1119  pszSystemDir = HeapAlloc(GetProcessHeap(), 0, uLength * sizeof(WCHAR));
1120  if (!pszSystemDir)
1121  return 0;
1122 
1123  if (GetSystemDirectoryW(pszSystemDir, uLength) != 0)
1124  {
1125  /* Get the required length, including the NULL terminator */
1126  dwRet = uLength + _countof(szKernelExe) - 1;
1127 
1128  if (lpExePath && (dwLength >= dwRet))
1129  {
1130  StringCchPrintfW(lpExePath, dwLength, L"%s%s",
1131  pszSystemDir, szKernelExe);
1132  }
1133  }
1134 
1135  HeapFree(GetProcessHeap(), 0, pszSystemDir);
1136  }
1137  else
1138  {
1139  HANDLE hProcess;
1140 
1142  if (hProcess)
1143  {
1144  dwRet = GetProcessExecutablePath(hProcess, lpExePath, dwLength);
1146  }
1147  }
1148 
1149  return dwRet;
1150 }
#define CloseHandle
Definition: compat.h:598
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:166
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:85
#define _countof(array)
Definition: sndvol32.h:68
unsigned long DWORD
Definition: ntddk_ex.h:95
static DWORD GetProcessExecutablePath(_In_ HANDLE hProcess, _Out_writes_to_opt_(dwLength, return) LPWSTR lpExePath, _In_opt_ DWORD dwLength)
Retrieves the Win32 path of an executable image, by handle.
Definition: procpage.c:1020
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by ProcessPage_OnOpenFileLocation(), and ProcessPage_OnProperties().

◆ GetSelectedProcessId()

DWORD GetSelectedProcessId ( void  )

Definition at line 104 of file procpage.c.

105 {
106  int Index;
107  LVITEM lvitem;
108 
110  {
112 
113  memset(&lvitem, 0, sizeof(LVITEM));
114 
115  lvitem.mask = LVIF_PARAM;
116  lvitem.iItem = Index;
117 
119 
120  if (lvitem.lParam)
121  return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
122  }
123 
124  return 0;
125 }
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2709
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2709
_In_ WDFCOLLECTION _In_ ULONG Index
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define LVIF_PARAM
Definition: commctrl.h:2311
#define LVITEM
Definition: commctrl.h:2375
#define ListView_GetSelectionMark(hwnd)
Definition: commctrl.h:2789
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:43

Referenced by DoSetPriority(), ProcessPage_OnDebug(), ProcessPage_OnEndProcess(), ProcessPage_OnEndProcessTree(), ProcessPage_OnOpenFileLocation(), ProcessPage_OnProperties(), ProcessPage_OnSetAffinity(), and ProcessPageOnNotify().

◆ largeintcmp()

int largeintcmp ( LARGE_INTEGER  l1,
LARGE_INTEGER  l2 
)

Definition at line 717 of file procpage.c.

718 {
719  int ret = 0;
720  DWORD dwHours1;
721  DWORD dwMinutes1;
722  DWORD dwSeconds1;
723  DWORD dwHours2;
724  DWORD dwMinutes2;
725  DWORD dwSeconds2;
726 
727  gethmsfromlargeint(l1, &dwHours1, &dwMinutes1, &dwSeconds1);
728  gethmsfromlargeint(l2, &dwHours2, &dwMinutes2, &dwSeconds2);
729  ret = CMP(dwHours1, dwHours2);
730  if (ret == 0)
731  {
732  ret = CMP(dwMinutes1, dwMinutes2);
733  if (ret == 0)
734  {
735  ret = CMP(dwSeconds1, dwSeconds2);
736  }
737  }
738  return ret;
739 }
#define CMP(x1, x2)
Definition: procpage.c:33
unsigned long DWORD
Definition: ntddk_ex.h:95
void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds)
Definition: procpage.c:704
int ret

Referenced by ProcessPageCompareFunc().

◆ PerfDataGetText()

BOOL PerfDataGetText ( ULONG  Index,
ULONG  ColumnIndex,
LPTSTR  lpText,
ULONG  nMaxCount 
)

Definition at line 562 of file procpage.c.

563 {
564  IO_COUNTERS iocounters;
566 
567  if (ColumnDataHints[ColumnIndex] == COLUMN_IMAGENAME)
569  if (ColumnDataHints[ColumnIndex] == COLUMN_PID)
570  wsprintfW(lpText, L"%lu", PerfDataGetProcessId(Index));
571  if (ColumnDataHints[ColumnIndex] == COLUMN_USERNAME)
573  if (ColumnDataHints[ColumnIndex] == COLUMN_COMMANDLINE)
575  if (ColumnDataHints[ColumnIndex] == COLUMN_SESSIONID)
576  wsprintfW(lpText, L"%lu", PerfDataGetSessionId(Index));
577  if (ColumnDataHints[ColumnIndex] == COLUMN_CPUUSAGE)
578  wsprintfW(lpText, L"%02lu", PerfDataGetCPUUsage(Index));
579  if (ColumnDataHints[ColumnIndex] == COLUMN_CPUTIME)
580  {
581  DWORD dwHours;
582  DWORD dwMinutes;
583  DWORD dwSeconds;
584 
586  gethmsfromlargeint(time, &dwHours, &dwMinutes, &dwSeconds);
587  wsprintfW(lpText, L"%lu:%02lu:%02lu", dwHours, dwMinutes, dwSeconds);
588  }
589  if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGE)
590  {
591  wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeBytes(Index) / 1024);
593  wcscat(lpText, L" K");
594  }
595  if (ColumnDataHints[ColumnIndex] == COLUMN_PEAKMEMORYUSAGE)
596  {
597  wsprintfW(lpText, L"%lu", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
599  wcscat(lpText, L" K");
600  }
601  if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGEDELTA)
602  {
603  wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeDelta(Index) / 1024);
605  wcscat(lpText, L" K");
606  }
607  if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTS)
608  {
609  wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCount(Index));
611  }
612  if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTSDELTA)
613  {
616  }
617  if (ColumnDataHints[ColumnIndex] == COLUMN_VIRTUALMEMORYSIZE)
618  {
619  wsprintfW(lpText, L"%lu", PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
621  wcscat(lpText, L" K");
622  }
623  if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEDPOOL)
624  {
625  wsprintfW(lpText, L"%lu", PerfDataGetPagedPoolUsagePages(Index) / 1024);
627  wcscat(lpText, L" K");
628  }
629  if (ColumnDataHints[ColumnIndex] == COLUMN_NONPAGEDPOOL)
630  {
631  wsprintfW(lpText, L"%lu", PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
633  wcscat(lpText, L" K");
634  }
635  if (ColumnDataHints[ColumnIndex] == COLUMN_BASEPRIORITY)
636  wsprintfW(lpText, L"%lu", PerfDataGetBasePriority(Index));
637  if (ColumnDataHints[ColumnIndex] == COLUMN_HANDLECOUNT)
638  {
639  wsprintfW(lpText, L"%lu", PerfDataGetHandleCount(Index));
641  }
642  if (ColumnDataHints[ColumnIndex] == COLUMN_THREADCOUNT)
643  {
644  wsprintfW(lpText, L"%lu", PerfDataGetThreadCount(Index));
646  }
647  if (ColumnDataHints[ColumnIndex] == COLUMN_USEROBJECTS)
648  {
651  }
652  if (ColumnDataHints[ColumnIndex] == COLUMN_GDIOBJECTS)
653  {
654  wsprintfW(lpText, L"%lu", PerfDataGetGDIObjectCount(Index));
656  }
657  if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADS)
658  {
659  PerfDataGetIOCounters(Index, &iocounters);
660  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.ReadOperationCount); */
661  _ui64tow(iocounters.ReadOperationCount, lpText, 10);
663  }
664  if (ColumnDataHints[ColumnIndex] == COLUMN_IOWRITES)
665  {
666  PerfDataGetIOCounters(Index, &iocounters);
667  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.WriteOperationCount); */
668  _ui64tow(iocounters.WriteOperationCount, lpText, 10);
670  }
671  if (ColumnDataHints[ColumnIndex] == COLUMN_IOOTHER)
672  {
673  PerfDataGetIOCounters(Index, &iocounters);
674  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.OtherOperationCount); */
675  _ui64tow(iocounters.OtherOperationCount, lpText, 10);
677  }
678  if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADBYTES)
679  {
680  PerfDataGetIOCounters(Index, &iocounters);
681  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.ReadTransferCount); */
682  _ui64tow(iocounters.ReadTransferCount, lpText, 10);
684  }
685  if (ColumnDataHints[ColumnIndex] == COLUMN_IOWRITEBYTES)
686  {
687  PerfDataGetIOCounters(Index, &iocounters);
688  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.WriteTransferCount); */
689  _ui64tow(iocounters.WriteTransferCount, lpText, 10);
691  }
692  if (ColumnDataHints[ColumnIndex] == COLUMN_IOOTHERBYTES)
693  {
694  PerfDataGetIOCounters(Index, &iocounters);
695  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.OtherTransferCount); */
696  _ui64tow(iocounters.OtherTransferCount, lpText, 10);
698  }
699 
700  return FALSE;
701 }
#define COLUMN_NONPAGEDPOOL
Definition: column.h:38
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
ULONG PerfDataGetBasePriority(ULONG Index)
Definition: perfdata.c:838
ULONGLONG OtherOperationCount
Definition: pstypes.h:85
#define COLUMN_GDIOBJECTS
Definition: column.h:43
#define COLUMN_PAGEFAULTSDELTA
Definition: column.h:35
#define COLUMN_PAGEFAULTS
Definition: column.h:34
#define COLUMN_COMMANDLINE
Definition: column.h:50
ULONG PerfDataGetWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:710
#define COLUMN_PID
Definition: column.h:26
ULONG PerfDataGetCPUUsage(ULONG Index)
Definition: perfdata.c:680
ULONGLONG WriteOperationCount
Definition: pstypes.h:84
ULONG PerfDataGetPageFaultCount(ULONG Index)
Definition: perfdata.c:758
#define COLUMN_CPUTIME
Definition: column.h:30
#define COLUMN_IOOTHERBYTES
Definition: column.h:49
ULONG PerfDataGetPageFaultCountDelta(ULONG Index)
Definition: perfdata.c:774
__u16 time
Definition: mkdosfs.c:366
#define COLUMN_USEROBJECTS
Definition: column.h:42
ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:822
ULONG PerfDataGetGDIObjectCount(ULONG Index)
Definition: perfdata.c:902
#define COLUMN_SESSIONID
Definition: column.h:28
#define COLUMN_CPUUSAGE
Definition: column.h:29
ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index)
Definition: perfdata.c:790
#define L(x)
Definition: ntvdm.h:50
#define COLUMN_THREADCOUNT
Definition: column.h:41
#define FALSE
Definition: types.h:117
__MINGW_EXTENSION _CRTIMP wchar_t *__cdecl _ui64tow(_In_ unsigned __int64 _Val, _Pre_notnull_ _Post_z_ wchar_t *_DstBuf, _In_ int _Radix)
BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount)
Definition: perfdata.c:490
ULONGLONG WriteTransferCount
Definition: pstypes.h:87
BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters)
Definition: perfdata.c:918
ULONG PerfDataGetThreadCount(ULONG Index)
Definition: perfdata.c:870
#define COLUMN_PAGEDPOOL
Definition: column.h:37
#define COLUMN_IMAGENAME
Definition: column.h:25
_In_ WDFCOLLECTION _In_ ULONG Index
ULONG PerfDataGetProcessId(ULONG Index)
Definition: perfdata.c:506
#define COLUMN_HANDLECOUNT
Definition: column.h:40
UINT ColumnDataHints[COLUMN_NMAX]
Definition: column.c:26
unsigned long DWORD
Definition: ntddk_ex.h:95
void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds)
Definition: procpage.c:704
ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:726
LARGE_INTEGER PerfDataGetCPUTime(ULONG Index)
Definition: perfdata.c:696
ULONGLONG ReadTransferCount
Definition: pstypes.h:86
void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount)
Definition: procpage.c:327
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
ULONG PerfDataGetWorkingSetSizeDelta(ULONG Index)
Definition: perfdata.c:742
ULONG PerfDataGetSessionId(ULONG Index)
Definition: perfdata.c:664
#define COLUMN_IOWRITEBYTES
Definition: column.h:48
ULONG PerfDataGetHandleCount(ULONG Index)
Definition: perfdata.c:854
BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount)
Definition: perfdata.c:522
#define COLUMN_IOWRITES
Definition: column.h:45
#define COLUMN_IOREADS
Definition: column.h:44
#define COLUMN_USERNAME
Definition: column.h:27
ULONGLONG OtherTransferCount
Definition: pstypes.h:88
#define COLUMN_IOOTHER
Definition: column.h:46
#define COLUMN_BASEPRIORITY
Definition: column.h:39
ULONG PerfDataGetUSERObjectCount(ULONG Index)
Definition: perfdata.c:886
_In_ int nMaxCount
Definition: winuser.h:4857
ULONG PerfDataGetPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:806
#define COLUMN_IOREADBYTES
Definition: column.h:47
#define COLUMN_MEMORYUSAGE
Definition: column.h:31
#define COLUMN_VIRTUALMEMORYSIZE
Definition: column.h:36
#define COLUMN_PEAKMEMORYUSAGE
Definition: column.h:32
ULONGLONG ReadOperationCount
Definition: pstypes.h:83
#define COLUMN_MEMORYUSAGEDELTA
Definition: column.h:33
BOOL PerfDataGetCommandLine(ULONG Index, LPWSTR lpCommandLine, ULONG nMaxCount)
Definition: perfdata.c:540

Referenced by ProcessPageOnNotify().

◆ ProcessPage_OnOpenFileLocation()

void ProcessPage_OnOpenFileLocation ( void  )

Definition at line 1191 of file procpage.c.

1192 {
1193  DWORD dwProcessId;
1194  DWORD dwLength;
1195  LPWSTR pszExePath;
1196  LPWSTR pszCmdLine = NULL;
1197 
1198  dwProcessId = GetSelectedProcessId();
1199 
1200  /* Retrieve the image path length */
1201  dwLength = GetProcessExecutablePathById(dwProcessId, NULL, 0);
1202  if (dwLength == 0)
1203  return;
1204 
1205  /* Allocate and retrieve the image path */
1206  pszExePath = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
1207  if (!pszExePath)
1208  return;
1209 
1210  if (GetProcessExecutablePathById(dwProcessId, pszExePath, dwLength) == 0)
1211  goto Cleanup;
1212 
1213  /* Build the shell command line */
1214  pszCmdLine = HeapAlloc(GetProcessHeap(), 0, (dwLength + 10) * sizeof(WCHAR));
1215  if (!pszCmdLine)
1216  goto Cleanup;
1217 
1218  StringCchPrintfW(pszCmdLine, dwLength + 10, L"/select,\"%s\"", pszExePath);
1219 
1220  /* Call the shell to open the file location and select it */
1221  ShellExecuteW(NULL, L"open", L"explorer.exe", pszCmdLine, NULL, SW_SHOWNORMAL);
1222 
1223 Cleanup:
1224  HeapFree(GetProcessHeap(), 0, pszCmdLine);
1225  HeapFree(GetProcessHeap(), 0, pszExePath);
1226 }
static DWORD GetProcessExecutablePathById(_In_ DWORD dwProcessId, _Out_writes_to_opt_(dwLength, return) LPWSTR lpExePath, _In_opt_ DWORD dwLength)
Retrieves the Win32 path of an executable image, by identifier.
Definition: procpage.c:1097
DWORD GetSelectedProcessId(void)
Definition: procpage.c:104
void Cleanup(void)
Definition: procpage.c:67
#define L(x)
Definition: ntvdm.h:50
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:85
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SW_SHOWNORMAL
Definition: winuser.h:764
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
#define NULL
Definition: types.h:112
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2354
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by TaskManagerWndProc().

◆ ProcessPage_OnProperties()

void ProcessPage_OnProperties ( void  )

Definition at line 1152 of file procpage.c.

1153 {
1154  DWORD dwProcessId;
1155  DWORD dwLength;
1156  LPWSTR pszExePath;
1157  SHELLEXECUTEINFOW info = { 0 };
1158 
1159  dwProcessId = GetSelectedProcessId();
1160 
1161  /* Retrieve the image path length */
1162  dwLength = GetProcessExecutablePathById(dwProcessId, NULL, 0);
1163  if (dwLength == 0)
1164  return;
1165 
1166  /* Allocate and retrieve the image path */
1167  pszExePath = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
1168  if (!pszExePath)
1169  return;
1170 
1171  if (GetProcessExecutablePathById(dwProcessId, pszExePath, dwLength) == 0)
1172  goto Cleanup;
1173 
1174  /* Call the shell to display the file properties */
1175  info.cbSize = sizeof(SHELLEXECUTEINFOW);
1176  info.fMask = SEE_MASK_INVOKEIDLIST;
1177  info.hwnd = NULL;
1178  info.lpVerb = L"properties";
1179  info.lpFile = pszExePath;
1180  info.lpParameters = L"";
1181  info.lpDirectory = NULL;
1182  info.nShow = SW_SHOW;
1183  info.hInstApp = NULL;
1184 
1186 
1187 Cleanup:
1188  HeapFree(GetProcessHeap(), 0, pszExePath);
1189 }
static DWORD GetProcessExecutablePathById(_In_ DWORD dwProcessId, _Out_writes_to_opt_(dwLength, return) LPWSTR lpExePath, _In_opt_ DWORD dwLength)
Retrieves the Win32 path of an executable image, by identifier.
Definition: procpage.c:1097
DWORD GetSelectedProcessId(void)
Definition: procpage.c:104
void Cleanup(void)
Definition: procpage.c:67
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2343
#define SW_SHOW
Definition: winuser.h:769
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:85
unsigned long DWORD
Definition: ntddk_ex.h:95
#define NULL
Definition: types.h:112
struct _SHELLEXECUTEINFOW SHELLEXECUTEINFOW
#define SEE_MASK_INVOKEIDLIST
Definition: shellapi.h:28
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by TaskManagerWndProc().

◆ ProcessPageCompareFunc()

int CALLBACK ProcessPageCompareFunc ( LPARAM  lParam1,
LPARAM  lParam2,
LPARAM  lParamSort 
)

Definition at line 741 of file procpage.c.

742 {
743  int ret = 0;
746  ULONG IndexParam1;
747  ULONG IndexParam2;
748  WCHAR text1[260];
749  WCHAR text2[260];
750  ULONG l1;
751  ULONG l2;
752  LARGE_INTEGER time1;
753  LARGE_INTEGER time2;
754  IO_COUNTERS iocounters1;
755  IO_COUNTERS iocounters2;
756  ULONGLONG ull1;
757  ULONGLONG ull2;
758 
760  Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
761  Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
762  } else {
763  Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
764  Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
765  }
766  IndexParam1 = PerfDataGetProcessIndex(Param1->ProcessId);
767  IndexParam2 = PerfDataGetProcessIndex(Param2->ProcessId);
768 
770  {
771  PerfDataGetImageName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
772  PerfDataGetImageName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
773  ret = _wcsicmp(text1, text2);
774  }
776  {
777  l1 = Param1->ProcessId;
778  l2 = Param2->ProcessId;
779  ret = CMP(l1, l2);
780  }
782  {
783  PerfDataGetUserName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
784  PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
785  ret = _wcsicmp(text1, text2);
786  }
788  {
789  PerfDataGetCommandLine(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
790  PerfDataGetCommandLine(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
791  ret = _wcsicmp(text1, text2);
792  }
794  {
795  l1 = PerfDataGetSessionId(IndexParam1);
796  l2 = PerfDataGetSessionId(IndexParam2);
797  ret = CMP(l1, l2);
798  }
800  {
801  l1 = PerfDataGetCPUUsage(IndexParam1);
802  l2 = PerfDataGetCPUUsage(IndexParam2);
803  ret = CMP(l1, l2);
804  }
806  {
807  time1 = PerfDataGetCPUTime(IndexParam1);
808  time2 = PerfDataGetCPUTime(IndexParam2);
809  ret = largeintcmp(time1, time2);
810  }
812  {
813  l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1);
814  l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2);
815  ret = CMP(l1, l2);
816  }
818  {
819  l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1);
820  l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2);
821  ret = CMP(l1, l2);
822  }
824  {
825  l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1);
826  l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2);
827  ret = CMP(l1, l2);
828  }
830  {
831  l1 = PerfDataGetPageFaultCount(IndexParam1);
832  l2 = PerfDataGetPageFaultCount(IndexParam2);
833  ret = CMP(l1, l2);
834  }
836  {
837  l1 = PerfDataGetPageFaultCountDelta(IndexParam1);
838  l2 = PerfDataGetPageFaultCountDelta(IndexParam2);
839  ret = CMP(l1, l2);
840  }
842  {
843  l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1);
844  l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2);
845  ret = CMP(l1, l2);
846  }
848  {
849  l1 = PerfDataGetPagedPoolUsagePages(IndexParam1);
850  l2 = PerfDataGetPagedPoolUsagePages(IndexParam2);
851  ret = CMP(l1, l2);
852  }
854  {
855  l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1);
856  l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2);
857  ret = CMP(l1, l2);
858  }
860  {
861  l1 = PerfDataGetBasePriority(IndexParam1);
862  l2 = PerfDataGetBasePriority(IndexParam2);
863  ret = CMP(l1, l2);
864  }
866  {
867  l1 = PerfDataGetHandleCount(IndexParam1);
868  l2 = PerfDataGetHandleCount(IndexParam2);
869  ret = CMP(l1, l2);
870  }
872  {
873  l1 = PerfDataGetThreadCount(IndexParam1);
874  l2 = PerfDataGetThreadCount(IndexParam2);
875  ret = CMP(l1, l2);
876  }
878  {
879  l1 = PerfDataGetUSERObjectCount(IndexParam1);
880  l2 = PerfDataGetUSERObjectCount(IndexParam2);
881  ret = CMP(l1, l2);
882  }
884  {
885  l1 = PerfDataGetGDIObjectCount(IndexParam1);
886  l2 = PerfDataGetGDIObjectCount(IndexParam2);
887  ret = CMP(l1, l2);
888  }
890  {
891  PerfDataGetIOCounters(IndexParam1, &iocounters1);
892  PerfDataGetIOCounters(IndexParam2, &iocounters2);
893  ull1 = iocounters1.ReadOperationCount;
894  ull2 = iocounters2.ReadOperationCount;
895  ret = CMP(ull1, ull2);
896  }
898  {
899  PerfDataGetIOCounters(IndexParam1, &iocounters1);
900  PerfDataGetIOCounters(IndexParam2, &iocounters2);
901  ull1 = iocounters1.WriteOperationCount;
902  ull2 = iocounters2.WriteOperationCount;
903  ret = CMP(ull1, ull2);
904  }
906  {
907  PerfDataGetIOCounters(IndexParam1, &iocounters1);
908  PerfDataGetIOCounters(IndexParam2, &iocounters2);
909  ull1 = iocounters1.OtherOperationCount;
910  ull2 = iocounters2.OtherOperationCount;
911  ret = CMP(ull1, ull2);
912  }
914  {
915  PerfDataGetIOCounters(IndexParam1, &iocounters1);
916  PerfDataGetIOCounters(IndexParam2, &iocounters2);
917  ull1 = iocounters1.ReadTransferCount;
918  ull2 = iocounters2.ReadTransferCount;
919  ret = CMP(ull1, ull2);
920  }
922  {
923  PerfDataGetIOCounters(IndexParam1, &iocounters1);
924  PerfDataGetIOCounters(IndexParam2, &iocounters2);
925  ull1 = iocounters1.WriteTransferCount;
926  ull2 = iocounters2.WriteTransferCount;
927  ret = CMP(ull1, ull2);
928  }
930  {
931  PerfDataGetIOCounters(IndexParam1, &iocounters1);
932  PerfDataGetIOCounters(IndexParam2, &iocounters2);
933  ull1 = iocounters1.OtherTransferCount;
934  ull2 = iocounters2.OtherTransferCount;
935  ret = CMP(ull1, ull2);
936  }
937  return ret;
938 }
#define COLUMN_NONPAGEDPOOL
Definition: column.h:38
ULONG PerfDataGetBasePriority(ULONG Index)
Definition: perfdata.c:838
ULONGLONG OtherOperationCount
Definition: pstypes.h:85
#define COLUMN_GDIOBJECTS
Definition: column.h:43
#define COLUMN_PAGEFAULTSDELTA
Definition: column.h:35
#define COLUMN_PAGEFAULTS
Definition: column.h:34
#define CMP(x1, x2)
Definition: procpage.c:33
#define COLUMN_COMMANDLINE
Definition: column.h:50
ULONG PerfDataGetWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:710
#define COLUMN_PID
Definition: column.h:26
ULONG PerfDataGetCPUUsage(ULONG Index)
Definition: perfdata.c:680
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
ULONGLONG WriteOperationCount
Definition: pstypes.h:84
ULONG PerfDataGetPageFaultCount(ULONG Index)
Definition: perfdata.c:758
#define COLUMN_CPUTIME
Definition: column.h:30
ULONG PerfDataGetProcessIndex(ULONG pid)
Definition: perfdata.c:440
#define COLUMN_IOOTHERBYTES
Definition: column.h:49
ULONG PerfDataGetPageFaultCountDelta(ULONG Index)
Definition: perfdata.c:774
#define COLUMN_USEROBJECTS
Definition: column.h:42
ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:822
ULONG PerfDataGetGDIObjectCount(ULONG Index)
Definition: perfdata.c:902
#define COLUMN_SESSIONID
Definition: column.h:28
#define COLUMN_CPUUSAGE
Definition: column.h:29
int largeintcmp(LARGE_INTEGER l1, LARGE_INTEGER l2)
Definition: procpage.c:717
ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index)
Definition: perfdata.c:790
#define COLUMN_THREADCOUNT
Definition: column.h:41
BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount)
Definition: perfdata.c:490
ULONGLONG WriteTransferCount
Definition: pstypes.h:87
BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters)
Definition: perfdata.c:918
ULONG PerfDataGetThreadCount(ULONG Index)
Definition: perfdata.c:870
#define COLUMN_PAGEDPOOL
Definition: column.h:37
#define COLUMN_IMAGENAME
Definition: column.h:25
__wchar_t WCHAR
Definition: xmlstorage.h:180
uint64_t ULONGLONG
Definition: typedefs.h:67
#define COLUMN_HANDLECOUNT
Definition: column.h:40
ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:726
int ret
LARGE_INTEGER PerfDataGetCPUTime(ULONG Index)
Definition: perfdata.c:696
ULONGLONG ReadTransferCount
Definition: pstypes.h:86
ULONG PerfDataGetWorkingSetSizeDelta(ULONG Index)
Definition: perfdata.c:742
ULONG PerfDataGetSessionId(ULONG Index)
Definition: perfdata.c:664
#define COLUMN_IOWRITEBYTES
Definition: column.h:48
ULONG PerfDataGetHandleCount(ULONG Index)
Definition: perfdata.c:854
BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount)
Definition: perfdata.c:522
unsigned int ULONG
Definition: retypes.h:1
#define COLUMN_IOWRITES
Definition: column.h:45
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:52
#define COLUMN_IOREADS
Definition: column.h:44
#define COLUMN_USERNAME
Definition: column.h:27
ULONGLONG OtherTransferCount
Definition: pstypes.h:88
#define COLUMN_IOOTHER
Definition: column.h:46
#define COLUMN_BASEPRIORITY
Definition: column.h:39
ULONG PerfDataGetUSERObjectCount(ULONG Index)
Definition: perfdata.c:886
ULONG PerfDataGetPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:806
#define COLUMN_IOREADBYTES
Definition: column.h:47
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define COLUMN_MEMORYUSAGE
Definition: column.h:31
#define COLUMN_VIRTUALMEMORYSIZE
Definition: column.h:36
#define COLUMN_PEAKMEMORYUSAGE
Definition: column.h:32
ULONGLONG ReadOperationCount
Definition: pstypes.h:83
#define COLUMN_MEMORYUSAGEDELTA
Definition: column.h:33
BOOL PerfDataGetCommandLine(ULONG Index, LPWSTR lpCommandLine, ULONG nMaxCount)
Definition: perfdata.c:540

Referenced by ProcessPageOnNotify(), and UpdateProcesses().

◆ ProcessPageOnNotify()

void ProcessPageOnNotify ( WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 252 of file procpage.c.

253 {
254  LPNMHDR pnmh;
255  NMLVDISPINFO* pnmdi;
256  LPNMHEADER pnmhdr;
257  ULONG Index;
258  ULONG ColumnIndex;
260 
261  pnmh = (LPNMHDR) lParam;
262  pnmdi = (NMLVDISPINFO*) lParam;
263  pnmhdr = (LPNMHEADER) lParam;
264 
265  if (pnmh->hwndFrom == hProcessPageListCtrl)
266  {
267  switch (pnmh->code)
268  {
269  case LVN_ITEMCHANGED:
271  break;
272 
273  case LVN_GETDISPINFO:
274 
275  if (!(pnmdi->item.mask & LVIF_TEXT))
276  break;
277 
278  pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam;
279  Index = PerfDataGetProcessIndex(pData->ProcessId);
280  ColumnIndex = pnmdi->item.iSubItem;
281 
282  PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, (ULONG)pnmdi->item.cchTextMax);
283 
284  break;
285 
286  case NM_RCLICK:
287 
289  break;
290 
291  case LVN_KEYDOWN:
292 
293  if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_DELETE)
295  break;
296 
297  }
298  }
299  else if (pnmh->hwndFrom == hProcessPageHeaderCtrl)
300  {
301  switch (pnmh->code)
302  {
303  case HDN_ITEMCLICK:
304 
308 
309  break;
310 
311  case HDN_ITEMCHANGED:
312 
314 
315  break;
316 
317  case HDN_ENDDRAG:
318 
320 
321  break;
322 
323  }
324  }
325 }
DWORD GetSelectedProcessId(void)
Definition: procpage.c:104
#define LPNMHEADER
Definition: commctrl.h:895
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount)
Definition: procpage.c:562
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
ULONG PerfDataGetProcessIndex(ULONG pid)
Definition: perfdata.c:440
struct tagNMHDR * LPNMHDR
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: procpage.c:741
#define LVIF_TEXT
Definition: commctrl.h:2309
void ProcessPageShowContextMenu(DWORD dwProcessId)
Definition: procpage.c:343
UINT code
Definition: winuser.h:3139
#define LVN_KEYDOWN
Definition: commctrl.h:3184
HWND hProcessPageHeaderCtrl
Definition: procpage.c:44
#define HDN_ITEMCHANGED
Definition: commctrl.h:867
void ProcessPage_OnEndProcess(void)
Definition: endproc.c:30
#define VK_DELETE
Definition: winuser.h:2213
void UpdateColumnDataHints(void)
Definition: column.c:203
#define NMLVDISPINFO
Definition: commctrl.h:3182
_In_ WDFCOLLECTION _In_ ULONG Index
UINT ColumnDataHints[COLUMN_NMAX]
Definition: column.c:26
HWND hwndFrom
Definition: winuser.h:3137
#define LVN_GETDISPINFO
Definition: commctrl.h:3160
#define HDN_ITEMCLICK
Definition: commctrl.h:868
#define HDN_ENDDRAG
Definition: commctrl.h:856
#define NM_RCLICK
Definition: commctrl.h:133
#define NULL
Definition: types.h:112
void ProcessPageUpdate(void)
Definition: procpage.c:127
#define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
Definition: commctrl.h:2703
unsigned int ULONG
Definition: retypes.h:1
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:52
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
HWND hProcessPageListCtrl
Definition: procpage.c:43
LPARAM lParam
Definition: combotst.c:139

Referenced by ProcessPageWndProc().

◆ ProcessPageRefreshThread()

DWORD WINAPI ProcessPageRefreshThread ( void lpParameter)

Definition at line 422 of file procpage.c.

423 {
424  MSG msg;
425 
426  while (1) {
427  /* Wait for an the event or application close */
428  if (GetMessage(&msg, NULL, 0, 0) <= 0)
429  return 0;
430 
431  if (msg.message == WM_TIMER) {
432 
433  UpdateProcesses();
434 
437 
439  }
440  }
441  return 0;
442 }
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define FALSE
Definition: types.h:117
void UpdateProcesses()
Definition: procpage.c:444
#define WM_TIMER
Definition: winuser.h:1729
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define NULL
Definition: types.h:112
HWND hProcessPage
Definition: procpage.c:41
#define GetMessage
Definition: winuser.h:5770
void ProcessPageUpdate(void)
Definition: procpage.c:127
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI IsWindowVisible(_In_ HWND)
HWND hProcessPageListCtrl
Definition: procpage.c:43

Referenced by ProcessPageWndProc().

◆ ProcessPageShowContextMenu()

void ProcessPageShowContextMenu ( DWORD  dwProcessId)

Definition at line 343 of file procpage.c.

344 {
345  HMENU hMenu;
346  HMENU hSubMenu;
347  HMENU hPriorityMenu;
348  POINT pt;
349  SYSTEM_INFO si;
351  DWORD dwProcessPriorityClass;
352  WCHAR strDebugger[260];
353  DWORD dwDebuggerSize;
354  HKEY hKey;
355 
356  memset(&si, 0, sizeof(SYSTEM_INFO));
357 
358  GetCursorPos(&pt);
359  GetSystemInfo(&si);
360 
362  hSubMenu = GetSubMenu(hMenu, 0);
363  hPriorityMenu = GetSubMenu(hSubMenu, 4);
364 
366  dwProcessPriorityClass = GetPriorityClass(hProcess);
368 
369  if (si.dwNumberOfProcessors < 2)
371 
372  switch (dwProcessPriorityClass) {
375  break;
376  case HIGH_PRIORITY_CLASS:
378  break;
381  break;
384  break;
387  break;
388  case IDLE_PRIORITY_CLASS:
390  break;
391  }
392 
393  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
394  {
395  dwDebuggerSize = sizeof(strDebugger);
396  if (RegQueryValueExW(hKey, L"Debugger", NULL, NULL, (LPBYTE)strDebugger, &dwDebuggerSize) == ERROR_SUCCESS)
397  {
398  CharUpper(strDebugger);
399  if (wcsstr(strDebugger, L"DRWTSN32"))
401  }
402  else
404 
405  RegCloseKey(hKey);
406  } else {
408  }
410  DestroyMenu(hMenu);
411 }
#define MF_DISABLED
Definition: winuser.h:130
#define REALTIME_PRIORITY_CLASS
Definition: winbase.h:184
#define CloseHandle
Definition: compat.h:598
#define CharUpper
Definition: winuser.h:5725
#define MF_BYCOMMAND
Definition: winuser.h:202
#define ERROR_SUCCESS
Definition: deptool.c:10
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:166
#define ID_PROCESS_PAGE_SETPRIORITY_NORMAL
Definition: resource.h:179
#define KEY_READ
Definition: nt_native.h:1023
#define pt(x, y)
Definition: drawing.c:79
#define TPM_LEFTALIGN
Definition: winuser.h:2357
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
#define ID_PROCESS_PAGE_SETPRIORITY_HIGH
Definition: resource.h:177
#define NORMAL_PRIORITY_CLASS
Definition: winbase.h:181
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2639
#define ABOVE_NORMAL_PRIORITY_CLASS
Definition: winbase.h:191
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
#define ID_PROCESS_PAGE_SETPRIORITY_REALTIME
Definition: resource.h:176
#define TPM_TOPALIGN
Definition: winuser.h:2363
#define HIGH_PRIORITY_CLASS
Definition: winbase.h:183
#define ID_PROCESS_PAGE_SETAFFINITY
Definition: resource.h:175
#define ID_PROCESS_PAGE_DEBUG
Definition: resource.h:174
#define IDLE_PRIORITY_CLASS
Definition: winbase.h:182
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4120
#define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
Definition: resource.h:180
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
Definition: resource.h:178
HWND hMainWnd
Definition: magnifier.c:32
#define IDR_PROCESS_PAGE_CONTEXT
Definition: resource.h:25
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI DestroyMenu(_In_ HMENU)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
HINSTANCE hInst
Definition: dxdiag.c:13
FxAutoRegKey hKey
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:142
#define NULL
Definition: types.h:112
DWORD dwNumberOfProcessors
Definition: winbase.h:1162
#define TPM_LEFTBUTTON
Definition: winuser.h:2359
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define BELOW_NORMAL_PRIORITY_CLASS
Definition: winbase.h:190
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3356
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define MF_GRAYED
Definition: winuser.h:129
DWORD WINAPI GetPriorityClass(IN HANDLE hProcess)
Definition: proc.c:1658
#define memset(x, y, z)
Definition: compat.h:39
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define RegCloseKey(hKey)
Definition: registry.h:47
#define ID_PROCESS_PAGE_SETPRIORITY_LOW
Definition: resource.h:181
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by ProcessPageOnNotify().

◆ ProcessPageUpdate()

void ProcessPageUpdate ( void  )

Definition at line 127 of file procpage.c.

128 {
129  /* Enable or disable the "End Process" button */
132  else
134 }
HWND hProcessPageEndProcessButton
Definition: procpage.c:45
#define TRUE
Definition: types.h:120
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2709
#define FALSE
Definition: types.h:117
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND hProcessPageListCtrl
Definition: procpage.c:43

Referenced by ProcessPageOnNotify(), ProcessPageRefreshThread(), and ProcessPageWndProc().

◆ ProcessPageWndProc()

INT_PTR CALLBACK ProcessPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 137 of file procpage.c.

138 {
139  RECT rc;
140  int nXDifference;
141  int nYDifference;
142  int cx, cy;
143 
144  switch (message) {
145  case WM_INITDIALOG:
146  /*
147  * Save the width and height
148  */
149  GetClientRect(hDlg, &rc);
152 
153  /* Update window position */
155 
156  /*
157  * Get handles to the controls
158  */
163 
164  /*
165  * Set the title, and extended window styles for the list control
166  */
169 
170  AddColumns();
171 
172  /*
173  * Subclass the process list control so we can intercept WM_ERASEBKGND
174  */
176 
177 #ifdef RUN_PROC_PAGE
178  /* Start our refresh thread */
180 #endif
181 
182  /* Refresh page */
184 
185  return TRUE;
186 
187  case WM_DESTROY:
188  /* Close the event handle, this will make the */
189  /* refresh thread exit when the wait fails */
190 #ifdef RUN_PROC_PAGE
192 #endif
194  Cleanup();
195  break;
196 
197  case WM_COMMAND:
198  /* Handle the button clicks */
199  switch (LOWORD(wParam))
200  {
201  case IDC_ENDPROCESS:
203  }
204  break;
205 
206  case WM_SIZE:
207  if (wParam == SIZE_MINIMIZED)
208  return 0;
209 
210  cx = LOWORD(lParam);
211  cy = HIWORD(lParam);
212  nXDifference = cx - nProcessPageWidth;
213  nYDifference = cy - nProcessPageHeight;
216 
217  /* Reposition the application page's controls */
219  cx = (rc.right - rc.left) + nXDifference;
220  cy = (rc.bottom - rc.top) + nYDifference;
223 
225  MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
226  cx = rc.left + nXDifference;
227  cy = rc.top + nYDifference;
230 
233  cx = rc.left;
234  cy = rc.top + nYDifference;
237  break;
238 
239  case WM_NOTIFY:
241  break;
242 
243  case WM_KEYDOWN:
244  if (wParam == VK_DELETE)
246  break;
247  }
248 
249  return 0;
250 }
INT_PTR CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: proclist.c:31
Definition: tftpd.h:59
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
static int nProcessPageWidth
Definition: procpage.c:49
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define IDC_PROCESSLIST
Definition: resource.h:37
HWND hProcessPageEndProcessButton
Definition: procpage.c:45
#define TRUE
Definition: types.h:120
#define IDC_SHOWALLPROCESSES
Definition: resource.h:41
#define ListView_GetHeader(hwnd)
Definition: commctrl.h:2651
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2734
LONG top
Definition: windef.h:307
static DWORD dwProcessThread
Definition: procpage.c:53
HWND hProcessPageShowAllProcessesButton
Definition: procpage.c:46
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
LONG left
Definition: windef.h:306
#define SWP_NOZORDER
Definition: winuser.h:1237
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
Definition: taskmgr.c:1181
LONG right
Definition: windef.h:308
static int nProcessPageHeight
Definition: procpage.c:50
WPARAM wParam
Definition: combotst.c:138
void Cleanup(void)
Definition: procpage.c:67
#define L(x)
Definition: ntvdm.h:50
#define ListView_GetExtendedListViewStyle(hwndLV)
Definition: commctrl.h:2728
HWND hProcessPageHeaderCtrl
Definition: procpage.c:44
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
#define LVS_EX_HEADERDRAGDROP
Definition: commctrl.h:2733
void SaveColumnSettings(void)
Definition: column.c:105
void ProcessPage_OnEndProcess(void)
Definition: endproc.c:30
#define WM_KEYDOWN
Definition: winuser.h:1702
#define VK_DELETE
Definition: winuser.h:2213
#define WM_DESTROY
Definition: winuser.h:1596
#define IDC_ENDPROCESS
Definition: resource.h:36
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SIZE
Definition: winuser.h:1598
#define SWP_NOACTIVATE
Definition: winuser.h:1232
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SIZE_MINIMIZED
Definition: winuser.h:2486
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2725
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
Definition: procpage.c:252
#define WM_COMMAND
Definition: winuser.h:1727
#define GWLP_WNDPROC
Definition: treelist.c:66
WNDPROC OldProcessListWndProc
Definition: proclist.c:27
#define SWP_NOSIZE
Definition: winuser.h:1235
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2886
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
Definition: procpage.c:422
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define NULL
Definition: types.h:112
void ProcessPageUpdate(void)
Definition: procpage.c:127
static HANDLE hProcessThread
Definition: procpage.c:52
_Out_opt_ int * cx
Definition: commctrl.h:585
#define HIWORD(l)
Definition: typedefs.h:247
LONG bottom
Definition: windef.h:309
#define SWP_NOMOVE
Definition: winuser.h:1234
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
Definition: winuser.h:5326
HWND hProcessPageListCtrl
Definition: procpage.c:43
#define WM_INITDIALOG
Definition: winuser.h:1726
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61
void AddColumns(void)
Definition: column.c:63
#define SWP_NOOWNERZORDER
Definition: winuser.h:1239

Referenced by OnCreate().

◆ ProcessRunning()

BOOL ProcessRunning ( ULONG  ProcessId)

Definition at line 500 of file procpage.c.

501 {
503  DWORD exitCode;
504 
505  if (ProcessId == 0) {
506  return TRUE;
507  }
508 
510  if (hProcess == NULL) {
511  return FALSE;
512  }
513 
514  if (GetExitCodeProcess(hProcess, &exitCode)) {
516  return (exitCode == STILL_ACTIVE);
517  }
518 
520  return FALSE;
521 }
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2709
#define CloseHandle
Definition: compat.h:598
#define PROCESS_ALL_ACCESS
Definition: nt_native.h:1324
#define TRUE
Definition: types.h:120
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
Definition: proc.c:1168
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
#define FALSE
Definition: types.h:117
#define STILL_ACTIVE
Definition: winbase.h:230
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
#define NULL
Definition: types.h:112

Referenced by UpdateProcesses().

◆ ProcGetIndexByProcessId()

int ProcGetIndexByProcessId ( DWORD  dwProcessId)

Definition at line 83 of file procpage.c.

84 {
85  int i;
86  LVITEM item;
88 
90  {
91  memset(&item, 0, sizeof(LV_ITEM));
92  item.mask = LVIF_PARAM;
93  item.iItem = i;
96  if (pData->ProcessId == dwProcessId)
97  {
98  return i;
99  }
100  }
101  return 0;
102 }
#define LV_ITEM
Definition: commctrl.h:2337
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
if(dx==0 &&dy==0)
Definition: linetemp.h:174
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
static ATOM item
Definition: dde.c:856
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define LVIF_PARAM
Definition: commctrl.h:2311
#define LVITEM
Definition: commctrl.h:2375
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:43

Referenced by ApplicationPage_OnGotoProcess().

◆ RefreshProcessPage()

void RefreshProcessPage ( void  )

Definition at line 413 of file procpage.c.

414 {
415 #ifdef RUN_PROC_PAGE
416  /* Signal the event so that our refresh thread */
417  /* will wake up and refresh the process page */
419 #endif
420 }
static DWORD dwProcessThread
Definition: procpage.c:53
#define WM_TIMER
Definition: winuser.h:1729
#define PostThreadMessage
Definition: winuser.h:5813

Referenced by OnCreate(), TaskManager_OnOptionsShow16BitTasks(), and TaskManagerWndProc().

◆ UpdateProcesses()

void UpdateProcesses ( )

Definition at line 444 of file procpage.c.

445 {
446  int i;
447  ULONG l;
448  LV_ITEM item;
450 
452 
453  /* Remove old processes */
455  {
456  memset(&item, 0, sizeof (LV_ITEM));
457  item.mask = LVIF_PARAM;
458  item.iItem = i;
461  if (!ProcessRunning(pData->ProcessId))
462  {
465  }
466  }
467 
468  /* Check for difference in listview process and performance process counts */
470  {
471  /* Add new processes by checking against the current items */
472  for (l = 0; l < PerfDataGetProcessCount(); l++)
473  {
474  AddProcess(l);
475  }
476  }
477 
479  {
481  }
482 
484 
485  /* Select first item if any */
488  {
491  }
492  /*
493  else
494  {
495  bProcessPageSelectionMade = FALSE;
496  }
497  */
498 }
#define LV_ITEM
Definition: commctrl.h:2337
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2434
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define TRUE
Definition: types.h:120
#define WM_SETREDRAW
Definition: winuser.h:1603
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
#define LVNI_SELECTED
Definition: commctrl.h:2424
if(dx==0 &&dy==0)
Definition: linetemp.h:174
int ProcessRunning(ULONG ProcessId)
Definition: procpage.c:500
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: procpage.c:741
BOOL bProcessPageSelectionMade
Definition: procpage.c:47
#define FALSE
Definition: types.h:117
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2673
#define LVIS_SELECTED
Definition: commctrl.h:2319
#define ListView_DeleteItem(hwnd, i)
Definition: commctrl.h:2411
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
#define LVNI_FOCUSED
Definition: commctrl.h:2423
ULONG PerfDataGetProcessCount(void)
Definition: perfdata.c:463
r l[0]
Definition: byte_order.h:167
void AddProcess(ULONG Index)
Definition: procpage.c:523
#define GetProcessHeap()
Definition: compat.h:595
static ATOM item
Definition: dde.c:856
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define NULL
Definition: types.h:112
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
Definition: commctrl.h:2703
#define SendMessage
Definition: winuser.h:5823
#define LVIF_PARAM
Definition: commctrl.h:2311
unsigned int ULONG
Definition: retypes.h:1
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:52
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:43
#define HeapFree(x, y, z)
Definition: compat.h:594
#define LVIS_FOCUSED
Definition: commctrl.h:2318

Referenced by ProcessPageRefreshThread().

Variable Documentation

◆ bProcessPageSelectionMade

BOOL bProcessPageSelectionMade = FALSE

Definition at line 47 of file procpage.c.

Referenced by UpdateProcesses().

◆ dwProcessThread

DWORD dwProcessThread
static

Definition at line 53 of file procpage.c.

Referenced by ProcessPageWndProc(), and RefreshProcessPage().

◆ hProcessPage

HWND hProcessPage

◆ hProcessPageEndProcessButton

HWND hProcessPageEndProcessButton

Definition at line 45 of file procpage.c.

Referenced by ProcessPageUpdate(), and ProcessPageWndProc().

◆ hProcessPageHeaderCtrl

◆ hProcessPageListCtrl

◆ hProcessPageShowAllProcessesButton

HWND hProcessPageShowAllProcessesButton

Definition at line 46 of file procpage.c.

Referenced by ProcessPageWndProc().

◆ hProcessThread

HANDLE hProcessThread = NULL
static

Definition at line 52 of file procpage.c.

Referenced by ProcessPageWndProc().

◆ nProcessPageHeight

int nProcessPageHeight
static

Definition at line 50 of file procpage.c.

Referenced by ProcessPageWndProc().

◆ nProcessPageWidth

int nProcessPageWidth
static

Definition at line 49 of file procpage.c.

Referenced by ProcessPageWndProc().