ReactOS  0.4.15-dev-425-gc40b086
procpage.c File Reference
#include "precomp.h"
#include "proclist.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)
 

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 28 of file procpage.c.

Typedef Documentation

◆ LPPROCESS_PAGE_LIST_ITEM

Function Documentation

◆ AddProcess()

void AddProcess ( ULONG  Index)

Definition at line 518 of file procpage.c.

519 {
521  int i;
522  LV_ITEM item;
523  BOOL bAlreadyInList = FALSE;
524  ULONG pid;
525 
527 
528  /* Check to see if it's already in our list */
530  {
531  memset(&item, 0, sizeof(LV_ITEM));
532  item.mask = LVIF_PARAM;
533  item.iItem = i;
536  if (pData->ProcessId == pid)
537  {
538  bAlreadyInList = TRUE;
539  break;
540  }
541  }
542  if (!bAlreadyInList) /* Add */
543  {
545  pData->ProcessId = pid;
546 
547  /* Add the item to the list */
548  memset(&item, 0, sizeof(LV_ITEM));
549  item.mask = LVIF_TEXT|LVIF_PARAM;
550  item.pszText = LPSTR_TEXTCALLBACK;
552  item.lParam = (LPARAM)pData;
554  }
555 }
#define LV_ITEM
Definition: commctrl.h:2333
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
#define TRUE
Definition: types.h:120
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_InsertItem(hwnd, pitem)
Definition: commctrl.h:2404
#define LVIF_TEXT
Definition: commctrl.h:2305
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
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef.h:208
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2303
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
if(!(yy_init))
Definition: macro.lex.yy.c:714
ULONG PerfDataGetProcessId(ULONG Index)
Definition: perfdata.c:515
static const UCHAR Index[8]
Definition: usbohci.c:18
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2390
#define LVIF_PARAM
Definition: commctrl.h:2307
unsigned int ULONG
Definition: retypes.h:1
#define LPSTR_TEXTCALLBACK
Definition: commctrl.h:2379
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:38

Referenced by UpdateProcesses().

◆ Cleanup()

void Cleanup ( void  )

Definition at line 62 of file procpage.c.

63 {
64  int i;
65  LV_ITEM item;
68  {
69  memset(&item, 0, sizeof(LV_ITEM));
70  item.mask = LVIF_PARAM;
71  item.iItem = i;
75  }
76 }
#define LV_ITEM
Definition: commctrl.h:2333
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
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_GetItemCount(hwnd)
Definition: commctrl.h:2303
#define GetProcessHeap()
Definition: compat.h:404
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2390
#define LVIF_PARAM
Definition: commctrl.h:2307
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:38
#define HeapFree(x, y, z)
Definition: compat.h:403

Referenced by ProcessPageWndProc().

◆ CommaSeparateNumberString()

void CommaSeparateNumberString ( LPWSTR  strNumber,
ULONG  nMaxCount 
)

Definition at line 322 of file procpage.c.

323 {
324  WCHAR temp[260];
325  UINT i, j, k;
326 
327  for (i=0,j=0; i<(wcslen(strNumber) % 3); i++, j++)
328  temp[j] = strNumber[i];
329  for (k=0; i<wcslen(strNumber); i++,j++,k++) {
330  if ((k % 3 == 0) && (j > 0))
331  temp[j++] = L',';
332  temp[j] = strNumber[i];
333  }
334  temp[j] = L'\0';
335  wcsncpy(strNumber, temp, nMaxCount);
336 }
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
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
static const WCHAR L[]
Definition: oid.c:1250
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
static calc_node_t temp
Definition: rpn_ieee.c:38
unsigned int UINT
Definition: ndis.h:50
_In_ int nMaxCount
Definition: winuser.h:4852
int k
Definition: mpi.c:3369
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by PerfDataGetText().

◆ gethmsfromlargeint()

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

Definition at line 699 of file procpage.c.

700 {
701 #ifdef _MSC_VER
702  *dwHours = (DWORD)(largeint.QuadPart / 36000000000L);
703  *dwMinutes = (DWORD)((largeint.QuadPart % 36000000000L) / 600000000L);
704  *dwSeconds = (DWORD)(((largeint.QuadPart % 36000000000L) % 600000000L) / 10000000L);
705 #else
706  *dwHours = (DWORD)(largeint.QuadPart / 36000000000LL);
707  *dwMinutes = (DWORD)((largeint.QuadPart % 36000000000LL) / 600000000LL);
708  *dwSeconds = (DWORD)(((largeint.QuadPart % 36000000000LL) % 600000000LL) / 10000000LL);
709 #endif
710 }
#define LL
Definition: tui.h:84
#define DWORD
Definition: nt_native.h:44
static const WCHAR L[]
Definition: oid.c:1250
LONGLONG QuadPart
Definition: typedefs.h:113

Referenced by largeintcmp(), and PerfDataGetText().

◆ GetSelectedProcessId()

DWORD GetSelectedProcessId ( void  )

Definition at line 99 of file procpage.c.

100 {
101  int Index;
102  LVITEM lvitem;
103 
105  {
107 
108  memset(&lvitem, 0, sizeof(LVITEM));
109 
110  lvitem.mask = LVIF_PARAM;
111  lvitem.iItem = Index;
112 
114 
115  if (lvitem.lParam)
116  return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
117  }
118 
119  return 0;
120 }
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2706
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:2705
static const UCHAR Index[8]
Definition: usbohci.c:18
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2390
#define LVIF_PARAM
Definition: commctrl.h:2307
#define LVITEM
Definition: commctrl.h:2371
#define ListView_GetSelectionMark(hwnd)
Definition: commctrl.h:2785
#define memset(x, y, z)
Definition: compat.h:39
HWND hProcessPageListCtrl
Definition: procpage.c:38

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

◆ largeintcmp()

int largeintcmp ( LARGE_INTEGER  l1,
LARGE_INTEGER  l2 
)

Definition at line 712 of file procpage.c.

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

Referenced by ProcessPageCompareFunc().

◆ PerfDataGetText()

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

Definition at line 557 of file procpage.c.

558 {
559  IO_COUNTERS iocounters;
561 
562  if (ColumnDataHints[ColumnIndex] == COLUMN_IMAGENAME)
564  if (ColumnDataHints[ColumnIndex] == COLUMN_PID)
565  wsprintfW(lpText, L"%lu", PerfDataGetProcessId(Index));
566  if (ColumnDataHints[ColumnIndex] == COLUMN_USERNAME)
568  if (ColumnDataHints[ColumnIndex] == COLUMN_COMMANDLINE)
570  if (ColumnDataHints[ColumnIndex] == COLUMN_SESSIONID)
571  wsprintfW(lpText, L"%lu", PerfDataGetSessionId(Index));
572  if (ColumnDataHints[ColumnIndex] == COLUMN_CPUUSAGE)
573  wsprintfW(lpText, L"%02lu", PerfDataGetCPUUsage(Index));
574  if (ColumnDataHints[ColumnIndex] == COLUMN_CPUTIME)
575  {
576  DWORD dwHours;
577  DWORD dwMinutes;
578  DWORD dwSeconds;
579 
581  gethmsfromlargeint(time, &dwHours, &dwMinutes, &dwSeconds);
582  wsprintfW(lpText, L"%lu:%02lu:%02lu", dwHours, dwMinutes, dwSeconds);
583  }
584  if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGE)
585  {
586  wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeBytes(Index) / 1024);
588  wcscat(lpText, L" K");
589  }
590  if (ColumnDataHints[ColumnIndex] == COLUMN_PEAKMEMORYUSAGE)
591  {
592  wsprintfW(lpText, L"%lu", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
594  wcscat(lpText, L" K");
595  }
596  if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGEDELTA)
597  {
598  wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeDelta(Index) / 1024);
600  wcscat(lpText, L" K");
601  }
602  if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTS)
603  {
604  wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCount(Index));
606  }
607  if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTSDELTA)
608  {
611  }
612  if (ColumnDataHints[ColumnIndex] == COLUMN_VIRTUALMEMORYSIZE)
613  {
614  wsprintfW(lpText, L"%lu", PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
616  wcscat(lpText, L" K");
617  }
618  if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEDPOOL)
619  {
620  wsprintfW(lpText, L"%lu", PerfDataGetPagedPoolUsagePages(Index) / 1024);
622  wcscat(lpText, L" K");
623  }
624  if (ColumnDataHints[ColumnIndex] == COLUMN_NONPAGEDPOOL)
625  {
626  wsprintfW(lpText, L"%lu", PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
628  wcscat(lpText, L" K");
629  }
630  if (ColumnDataHints[ColumnIndex] == COLUMN_BASEPRIORITY)
631  wsprintfW(lpText, L"%lu", PerfDataGetBasePriority(Index));
632  if (ColumnDataHints[ColumnIndex] == COLUMN_HANDLECOUNT)
633  {
634  wsprintfW(lpText, L"%lu", PerfDataGetHandleCount(Index));
636  }
637  if (ColumnDataHints[ColumnIndex] == COLUMN_THREADCOUNT)
638  {
639  wsprintfW(lpText, L"%lu", PerfDataGetThreadCount(Index));
641  }
642  if (ColumnDataHints[ColumnIndex] == COLUMN_USEROBJECTS)
643  {
646  }
647  if (ColumnDataHints[ColumnIndex] == COLUMN_GDIOBJECTS)
648  {
649  wsprintfW(lpText, L"%lu", PerfDataGetGDIObjectCount(Index));
651  }
652  if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADS)
653  {
654  PerfDataGetIOCounters(Index, &iocounters);
655  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.ReadOperationCount); */
656  _ui64tow(iocounters.ReadOperationCount, lpText, 10);
658  }
659  if (ColumnDataHints[ColumnIndex] == COLUMN_IOWRITES)
660  {
661  PerfDataGetIOCounters(Index, &iocounters);
662  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.WriteOperationCount); */
663  _ui64tow(iocounters.WriteOperationCount, lpText, 10);
665  }
666  if (ColumnDataHints[ColumnIndex] == COLUMN_IOOTHER)
667  {
668  PerfDataGetIOCounters(Index, &iocounters);
669  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.OtherOperationCount); */
670  _ui64tow(iocounters.OtherOperationCount, lpText, 10);
672  }
673  if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADBYTES)
674  {
675  PerfDataGetIOCounters(Index, &iocounters);
676  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.ReadTransferCount); */
677  _ui64tow(iocounters.ReadTransferCount, lpText, 10);
679  }
680  if (ColumnDataHints[ColumnIndex] == COLUMN_IOWRITEBYTES)
681  {
682  PerfDataGetIOCounters(Index, &iocounters);
683  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.WriteTransferCount); */
684  _ui64tow(iocounters.WriteTransferCount, lpText, 10);
686  }
687  if (ColumnDataHints[ColumnIndex] == COLUMN_IOOTHERBYTES)
688  {
689  PerfDataGetIOCounters(Index, &iocounters);
690  /* wsprintfW(pnmdi->item.pszText, L"%d", iocounters.OtherTransferCount); */
691  _ui64tow(iocounters.OtherTransferCount, lpText, 10);
693  }
694 
695  return FALSE;
696 }
#define COLUMN_NONPAGEDPOOL
Definition: column.h:38
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
ULONG PerfDataGetBasePriority(ULONG Index)
Definition: perfdata.c:847
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:719
#define COLUMN_PID
Definition: column.h:26
ULONG PerfDataGetCPUUsage(ULONG Index)
Definition: perfdata.c:689
ULONGLONG WriteOperationCount
Definition: pstypes.h:84
ULONG PerfDataGetPageFaultCount(ULONG Index)
Definition: perfdata.c:767
#define COLUMN_CPUTIME
Definition: column.h:30
#define COLUMN_IOOTHERBYTES
Definition: column.h:49
ULONG PerfDataGetPageFaultCountDelta(ULONG Index)
Definition: perfdata.c:783
__u16 time
Definition: mkdosfs.c:366
#define COLUMN_USEROBJECTS
Definition: column.h:42
ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:831
ULONG PerfDataGetGDIObjectCount(ULONG Index)
Definition: perfdata.c:911
#define COLUMN_SESSIONID
Definition: column.h:28
#define COLUMN_CPUUSAGE
Definition: column.h:29
ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index)
Definition: perfdata.c:799
#define COLUMN_THREADCOUNT
Definition: column.h:41
__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:499
ULONGLONG WriteTransferCount
Definition: pstypes.h:87
BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters)
Definition: perfdata.c:927
ULONG PerfDataGetThreadCount(ULONG Index)
Definition: perfdata.c:879
#define COLUMN_PAGEDPOOL
Definition: column.h:37
#define COLUMN_IMAGENAME
Definition: column.h:25
ULONG PerfDataGetProcessId(ULONG Index)
Definition: perfdata.c:515
#define COLUMN_HANDLECOUNT
Definition: column.h:40
UINT ColumnDataHints[COLUMN_NMAX]
Definition: column.c:26
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned long DWORD
Definition: ntddk_ex.h:95
void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds)
Definition: procpage.c:699
ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:735
LARGE_INTEGER PerfDataGetCPUTime(ULONG Index)
Definition: perfdata.c:705
static const WCHAR L[]
Definition: oid.c:1250
ULONGLONG ReadTransferCount
Definition: pstypes.h:86
void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount)
Definition: procpage.c:322
_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:751
ULONG PerfDataGetSessionId(ULONG Index)
Definition: perfdata.c:673
#define COLUMN_IOWRITEBYTES
Definition: column.h:48
ULONG PerfDataGetHandleCount(ULONG Index)
Definition: perfdata.c:863
BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount)
Definition: perfdata.c:531
#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:895
_In_ int nMaxCount
Definition: winuser.h:4852
ULONG PerfDataGetPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:815
#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:549

Referenced by ProcessPageOnNotify().

◆ ProcessPageCompareFunc()

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

Definition at line 736 of file procpage.c.

737 {
738  int ret = 0;
741  ULONG IndexParam1;
742  ULONG IndexParam2;
743  WCHAR text1[260];
744  WCHAR text2[260];
745  ULONG l1;
746  ULONG l2;
747  LARGE_INTEGER time1;
748  LARGE_INTEGER time2;
749  IO_COUNTERS iocounters1;
750  IO_COUNTERS iocounters2;
751  ULONGLONG ull1;
752  ULONGLONG ull2;
753 
755  Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
756  Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
757  } else {
758  Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
759  Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
760  }
761  IndexParam1 = PerfDataGetProcessIndex(Param1->ProcessId);
762  IndexParam2 = PerfDataGetProcessIndex(Param2->ProcessId);
763 
765  {
766  PerfDataGetImageName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
767  PerfDataGetImageName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
768  ret = _wcsicmp(text1, text2);
769  }
771  {
772  l1 = Param1->ProcessId;
773  l2 = Param2->ProcessId;
774  ret = CMP(l1, l2);
775  }
777  {
778  PerfDataGetUserName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
779  PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
780  ret = _wcsicmp(text1, text2);
781  }
783  {
784  PerfDataGetCommandLine(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
785  PerfDataGetCommandLine(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
786  ret = _wcsicmp(text1, text2);
787  }
789  {
790  l1 = PerfDataGetSessionId(IndexParam1);
791  l2 = PerfDataGetSessionId(IndexParam2);
792  ret = CMP(l1, l2);
793  }
795  {
796  l1 = PerfDataGetCPUUsage(IndexParam1);
797  l2 = PerfDataGetCPUUsage(IndexParam2);
798  ret = CMP(l1, l2);
799  }
801  {
802  time1 = PerfDataGetCPUTime(IndexParam1);
803  time2 = PerfDataGetCPUTime(IndexParam2);
804  ret = largeintcmp(time1, time2);
805  }
807  {
808  l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1);
809  l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2);
810  ret = CMP(l1, l2);
811  }
813  {
814  l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1);
815  l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2);
816  ret = CMP(l1, l2);
817  }
819  {
820  l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1);
821  l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2);
822  ret = CMP(l1, l2);
823  }
825  {
826  l1 = PerfDataGetPageFaultCount(IndexParam1);
827  l2 = PerfDataGetPageFaultCount(IndexParam2);
828  ret = CMP(l1, l2);
829  }
831  {
832  l1 = PerfDataGetPageFaultCountDelta(IndexParam1);
833  l2 = PerfDataGetPageFaultCountDelta(IndexParam2);
834  ret = CMP(l1, l2);
835  }
837  {
838  l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1);
839  l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2);
840  ret = CMP(l1, l2);
841  }
843  {
844  l1 = PerfDataGetPagedPoolUsagePages(IndexParam1);
845  l2 = PerfDataGetPagedPoolUsagePages(IndexParam2);
846  ret = CMP(l1, l2);
847  }
849  {
850  l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1);
851  l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2);
852  ret = CMP(l1, l2);
853  }
855  {
856  l1 = PerfDataGetBasePriority(IndexParam1);
857  l2 = PerfDataGetBasePriority(IndexParam2);
858  ret = CMP(l1, l2);
859  }
861  {
862  l1 = PerfDataGetHandleCount(IndexParam1);
863  l2 = PerfDataGetHandleCount(IndexParam2);
864  ret = CMP(l1, l2);
865  }
867  {
868  l1 = PerfDataGetThreadCount(IndexParam1);
869  l2 = PerfDataGetThreadCount(IndexParam2);
870  ret = CMP(l1, l2);
871  }
873  {
874  l1 = PerfDataGetUSERObjectCount(IndexParam1);
875  l2 = PerfDataGetUSERObjectCount(IndexParam2);
876  ret = CMP(l1, l2);
877  }
879  {
880  l1 = PerfDataGetGDIObjectCount(IndexParam1);
881  l2 = PerfDataGetGDIObjectCount(IndexParam2);
882  ret = CMP(l1, l2);
883  }
885  {
886  PerfDataGetIOCounters(IndexParam1, &iocounters1);
887  PerfDataGetIOCounters(IndexParam2, &iocounters2);
888  ull1 = iocounters1.ReadOperationCount;
889  ull2 = iocounters2.ReadOperationCount;
890  ret = CMP(ull1, ull2);
891  }
893  {
894  PerfDataGetIOCounters(IndexParam1, &iocounters1);
895  PerfDataGetIOCounters(IndexParam2, &iocounters2);
896  ull1 = iocounters1.WriteOperationCount;
897  ull2 = iocounters2.WriteOperationCount;
898  ret = CMP(ull1, ull2);
899  }
901  {
902  PerfDataGetIOCounters(IndexParam1, &iocounters1);
903  PerfDataGetIOCounters(IndexParam2, &iocounters2);
904  ull1 = iocounters1.OtherOperationCount;
905  ull2 = iocounters2.OtherOperationCount;
906  ret = CMP(ull1, ull2);
907  }
909  {
910  PerfDataGetIOCounters(IndexParam1, &iocounters1);
911  PerfDataGetIOCounters(IndexParam2, &iocounters2);
912  ull1 = iocounters1.ReadTransferCount;
913  ull2 = iocounters2.ReadTransferCount;
914  ret = CMP(ull1, ull2);
915  }
917  {
918  PerfDataGetIOCounters(IndexParam1, &iocounters1);
919  PerfDataGetIOCounters(IndexParam2, &iocounters2);
920  ull1 = iocounters1.WriteTransferCount;
921  ull2 = iocounters2.WriteTransferCount;
922  ret = CMP(ull1, ull2);
923  }
925  {
926  PerfDataGetIOCounters(IndexParam1, &iocounters1);
927  PerfDataGetIOCounters(IndexParam2, &iocounters2);
928  ull1 = iocounters1.OtherTransferCount;
929  ull2 = iocounters2.OtherTransferCount;
930  ret = CMP(ull1, ull2);
931  }
932  return ret;
933 }
#define COLUMN_NONPAGEDPOOL
Definition: column.h:38
ULONG PerfDataGetBasePriority(ULONG Index)
Definition: perfdata.c:847
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:28
#define COLUMN_COMMANDLINE
Definition: column.h:50
ULONG PerfDataGetWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:719
#define COLUMN_PID
Definition: column.h:26
ULONG PerfDataGetCPUUsage(ULONG Index)
Definition: perfdata.c:689
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
ULONGLONG WriteOperationCount
Definition: pstypes.h:84
ULONG PerfDataGetPageFaultCount(ULONG Index)
Definition: perfdata.c:767
#define COLUMN_CPUTIME
Definition: column.h:30
ULONG PerfDataGetProcessIndex(ULONG pid)
Definition: perfdata.c:449
#define COLUMN_IOOTHERBYTES
Definition: column.h:49
ULONG PerfDataGetPageFaultCountDelta(ULONG Index)
Definition: perfdata.c:783
#define COLUMN_USEROBJECTS
Definition: column.h:42
ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:831
ULONG PerfDataGetGDIObjectCount(ULONG Index)
Definition: perfdata.c:911
#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:712
ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index)
Definition: perfdata.c:799
#define COLUMN_THREADCOUNT
Definition: column.h:41
BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount)
Definition: perfdata.c:499
ULONGLONG WriteTransferCount
Definition: pstypes.h:87
BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters)
Definition: perfdata.c:927
ULONG PerfDataGetThreadCount(ULONG Index)
Definition: perfdata.c:879
#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:66
#define COLUMN_HANDLECOUNT
Definition: column.h:40
ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index)
Definition: perfdata.c:735
int ret
LARGE_INTEGER PerfDataGetCPUTime(ULONG Index)
Definition: perfdata.c:705
ULONGLONG ReadTransferCount
Definition: pstypes.h:86
ULONG PerfDataGetWorkingSetSizeDelta(ULONG Index)
Definition: perfdata.c:751
ULONG PerfDataGetSessionId(ULONG Index)
Definition: perfdata.c:673
#define COLUMN_IOWRITEBYTES
Definition: column.h:48
ULONG PerfDataGetHandleCount(ULONG Index)
Definition: perfdata.c:863
BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount)
Definition: perfdata.c:531
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:895
ULONG PerfDataGetPagedPoolUsagePages(ULONG Index)
Definition: perfdata.c:815
#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:549

Referenced by ProcessPageOnNotify(), and UpdateProcesses().

◆ ProcessPageOnNotify()

void ProcessPageOnNotify ( WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 247 of file procpage.c.

248 {
249  LPNMHDR pnmh;
250  NMLVDISPINFO* pnmdi;
251  LPNMHEADER pnmhdr;
252  ULONG Index;
253  ULONG ColumnIndex;
255 
256  pnmh = (LPNMHDR) lParam;
257  pnmdi = (NMLVDISPINFO*) lParam;
258  pnmhdr = (LPNMHEADER) lParam;
259 
260  if (pnmh->hwndFrom == hProcessPageListCtrl)
261  {
262  switch (pnmh->code)
263  {
264  case LVN_ITEMCHANGED:
266  break;
267 
268  case LVN_GETDISPINFO:
269 
270  if (!(pnmdi->item.mask & LVIF_TEXT))
271  break;
272 
273  pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam;
274  Index = PerfDataGetProcessIndex(pData->ProcessId);
275  ColumnIndex = pnmdi->item.iSubItem;
276 
277  PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, (ULONG)pnmdi->item.cchTextMax);
278 
279  break;
280 
281  case NM_RCLICK:
282 
284  break;
285 
286  case LVN_KEYDOWN:
287 
288  if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_DELETE)
290  break;
291 
292  }
293  }
294  else if (pnmh->hwndFrom == hProcessPageHeaderCtrl)
295  {
296  switch (pnmh->code)
297  {
298  case HDN_ITEMCLICK:
299 
303 
304  break;
305 
306  case HDN_ITEMCHANGED:
307 
309 
310  break;
311 
312  case HDN_ENDDRAG:
313 
315 
316  break;
317 
318  }
319  }
320 }
DWORD GetSelectedProcessId(void)
Definition: procpage.c:99
#define LPNMHEADER
Definition: commctrl.h:891
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:3127
BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount)
Definition: procpage.c:557
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
ULONG PerfDataGetProcessIndex(ULONG pid)
Definition: perfdata.c:449
struct tagNMHDR * LPNMHDR
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: procpage.c:736
#define LVIF_TEXT
Definition: commctrl.h:2305
void ProcessPageShowContextMenu(DWORD dwProcessId)
Definition: procpage.c:338
UINT code
Definition: winuser.h:3134
#define LVN_KEYDOWN
Definition: commctrl.h:3180
HWND hProcessPageHeaderCtrl
Definition: procpage.c:39
#define HDN_ITEMCHANGED
Definition: commctrl.h:863
void ProcessPage_OnEndProcess(void)
Definition: endproc.c:30
smooth NULL
Definition: ftsmooth.c:416
#define VK_DELETE
Definition: winuser.h:2208
void UpdateColumnDataHints(void)
Definition: column.c:203
#define NMLVDISPINFO
Definition: commctrl.h:3178
UINT ColumnDataHints[COLUMN_NMAX]
Definition: column.c:26
static const UCHAR Index[8]
Definition: usbohci.c:18
HWND hwndFrom
Definition: winuser.h:3132
#define LVN_GETDISPINFO
Definition: commctrl.h:3156
#define HDN_ITEMCLICK
Definition: commctrl.h:864
#define HDN_ENDDRAG
Definition: commctrl.h:852
#define NM_RCLICK
Definition: commctrl.h:133
void ProcessPageUpdate(void)
Definition: procpage.c:122
#define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
Definition: commctrl.h:2699
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:38
LPARAM lParam
Definition: combotst.c:139

Referenced by ProcessPageWndProc().

◆ ProcessPageRefreshThread()

DWORD WINAPI ProcessPageRefreshThread ( void lpParameter)

Definition at line 417 of file procpage.c.

418 {
419  MSG msg;
420 
421  while (1) {
422  /* Wait for an the event or application close */
423  if (GetMessage(&msg, NULL, 0, 0) <= 0)
424  return 0;
425 
426  if (msg.message == WM_TIMER) {
427 
428  UpdateProcesses();
429 
432 
434  }
435  }
436  return 0;
437 }
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
void UpdateProcesses()
Definition: procpage.c:439
smooth NULL
Definition: ftsmooth.c:416
#define WM_TIMER
Definition: winuser.h:1724
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HWND hProcessPage
Definition: procpage.c:36
#define GetMessage
Definition: winuser.h:5765
void ProcessPageUpdate(void)
Definition: procpage.c:122
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI IsWindowVisible(_In_ HWND)
HWND hProcessPageListCtrl
Definition: procpage.c:38

Referenced by ProcessPageWndProc().

◆ ProcessPageShowContextMenu()

void ProcessPageShowContextMenu ( DWORD  dwProcessId)

Definition at line 338 of file procpage.c.

339 {
340  HMENU hMenu;
341  HMENU hSubMenu;
342  HMENU hPriorityMenu;
343  POINT pt;
344  SYSTEM_INFO si;
346  DWORD dwProcessPriorityClass;
347  WCHAR strDebugger[260];
348  DWORD dwDebuggerSize;
349  HKEY hKey;
350 
351  memset(&si, 0, sizeof(SYSTEM_INFO));
352 
353  GetCursorPos(&pt);
354  GetSystemInfo(&si);
355 
357  hSubMenu = GetSubMenu(hMenu, 0);
358  hPriorityMenu = GetSubMenu(hSubMenu, 4);
359 
361  dwProcessPriorityClass = GetPriorityClass(hProcess);
363 
364  if (si.dwNumberOfProcessors < 2)
366 
367  switch (dwProcessPriorityClass) {
370  break;
371  case HIGH_PRIORITY_CLASS:
373  break;
376  break;
379  break;
382  break;
383  case IDLE_PRIORITY_CLASS:
385  break;
386  }
387 
388  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
389  {
390  dwDebuggerSize = sizeof(strDebugger);
391  if (RegQueryValueExW(hKey, L"Debugger", NULL, NULL, (LPBYTE)strDebugger, &dwDebuggerSize) == ERROR_SUCCESS)
392  {
393  CharUpper(strDebugger);
394  if (wcsstr(strDebugger, L"DRWTSN32"))
396  }
397  else
399 
400  RegCloseKey(hKey);
401  } else {
403  }
405  DestroyMenu(hMenu);
406 }
#define MF_DISABLED
Definition: winuser.h:130
#define REALTIME_PRIORITY_CLASS
Definition: winbase.h:184
#define CloseHandle
Definition: compat.h:407
#define CharUpper
Definition: winuser.h:5720
#define MF_BYCOMMAND
Definition: winuser.h:202
#define ERROR_SUCCESS
Definition: deptool.c:10
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:158
#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:2352
_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:2635
#define ABOVE_NORMAL_PRIORITY_CLASS
Definition: winbase.h:191
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:53
#define ID_PROCESS_PAGE_SETPRIORITY_REALTIME
Definition: resource.h:176
#define TPM_TOPALIGN
Definition: winuser.h:2358
#define HIGH_PRIORITY_CLASS
Definition: winbase.h:183
smooth NULL
Definition: ftsmooth.c:416
#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:4116
#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
static const WCHAR L[]
Definition: oid.c:1250
#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
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:142
DWORD dwNumberOfProcessors
Definition: winbase.h:1143
#define TPM_LEFTBUTTON
Definition: winuser.h:2354
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:3366
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define MF_GRAYED
Definition: winuser.h:129
DWORD WINAPI GetPriorityClass(IN HANDLE hProcess)
Definition: proc.c:1659
#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 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 122 of file procpage.c.

123 {
124  /* Enable or disable the "End Process" button */
127  else
129 }
#define TRUE
Definition: types.h:120
HWND hProcessPageEndProcessButton
Definition: procpage.c:40
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2705
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND hProcessPageListCtrl
Definition: procpage.c:38

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

◆ ProcessPageWndProc()

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

Definition at line 132 of file procpage.c.

133 {
134  RECT rc;
135  int nXDifference;
136  int nYDifference;
137  int cx, cy;
138 
139  switch (message) {
140  case WM_INITDIALOG:
141  /*
142  * Save the width and height
143  */
144  GetClientRect(hDlg, &rc);
147 
148  /* Update window position */
150 
151  /*
152  * Get handles to the controls
153  */
158 
159  /*
160  * Set the title, and extended window styles for the list control
161  */
164 
165  AddColumns();
166 
167  /*
168  * Subclass the process list control so we can intercept WM_ERASEBKGND
169  */
171 
172 #ifdef RUN_PROC_PAGE
173  /* Start our refresh thread */
175 #endif
176 
177  /* Refresh page */
179 
180  return TRUE;
181 
182  case WM_DESTROY:
183  /* Close the event handle, this will make the */
184  /* refresh thread exit when the wait fails */
185 #ifdef RUN_PROC_PAGE
187 #endif
189  Cleanup();
190  break;
191 
192  case WM_COMMAND:
193  /* Handle the button clicks */
194  switch (LOWORD(wParam))
195  {
196  case IDC_ENDPROCESS:
198  }
199  break;
200 
201  case WM_SIZE:
202  if (wParam == SIZE_MINIMIZED)
203  return 0;
204 
205  cx = LOWORD(lParam);
206  cy = HIWORD(lParam);
207  nXDifference = cx - nProcessPageWidth;
208  nYDifference = cy - nProcessPageHeight;
211 
212  /* Reposition the application page's controls */
214  cx = (rc.right - rc.left) + nXDifference;
215  cy = (rc.bottom - rc.top) + nYDifference;
218 
220  MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
221  cx = rc.left + nXDifference;
222  cy = rc.top + nYDifference;
225 
228  cx = rc.left;
229  cy = rc.top + nYDifference;
232  break;
233 
234  case WM_NOTIFY:
236  break;
237 
238  case WM_KEYDOWN:
239  if (wParam == VK_DELETE)
241  break;
242  }
243 
244  return 0;
245 }
INT_PTR CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: proclist.c:31
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
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:44
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:40
#define IDC_SHOWALLPROCESSES
Definition: resource.h:41
#define ListView_GetHeader(hwnd)
Definition: commctrl.h:2647
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2730
LONG top
Definition: windef.h:307
static DWORD dwProcessThread
Definition: procpage.c:48
HWND hProcessPageShowAllProcessesButton
Definition: procpage.c:41
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
LONG left
Definition: windef.h:306
#define SWP_NOZORDER
Definition: winuser.h:1232
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
Definition: taskmgr.c:1175
LONG right
Definition: windef.h:308
static int nProcessPageHeight
Definition: procpage.c:45
WPARAM wParam
Definition: combotst.c:138
void Cleanup(void)
Definition: procpage.c:62
#define ListView_GetExtendedListViewStyle(hwndLV)
Definition: commctrl.h:2724
HWND hProcessPageHeaderCtrl
Definition: procpage.c:39
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
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:136
#define LVS_EX_HEADERDRAGDROP
Definition: commctrl.h:2729
void SaveColumnSettings(void)
Definition: column.c:105
void ProcessPage_OnEndProcess(void)
Definition: endproc.c:30
smooth NULL
Definition: ftsmooth.c:416
#define WM_KEYDOWN
Definition: winuser.h:1697
#define VK_DELETE
Definition: winuser.h:2208
#define WM_DESTROY
Definition: winuser.h:1591
#define IDC_ENDPROCESS
Definition: resource.h:36
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SIZE_MINIMIZED
Definition: winuser.h:2481
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2721
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
Definition: procpage.c:247
static const WCHAR L[]
Definition: oid.c:1250
#define WM_COMMAND
Definition: winuser.h:1722
#define GWLP_WNDPROC
Definition: treelist.c:66
WNDPROC OldProcessListWndProc
Definition: proclist.c:27
#define SWP_NOSIZE
Definition: winuser.h:1230
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
Definition: procpage.c:417
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
void ProcessPageUpdate(void)
Definition: procpage.c:122
static HANDLE hProcessThread
Definition: procpage.c:47
_Out_opt_ int * cx
Definition: commctrl.h:581
#define HIWORD(l)
Definition: typedefs.h:246
LONG bottom
Definition: windef.h:309
#define SWP_NOMOVE
Definition: winuser.h:1229
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:5321
HWND hProcessPageListCtrl
Definition: procpage.c:38
#define WM_INITDIALOG
Definition: winuser.h:1721
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:1234

Referenced by OnCreate().

◆ ProcessRunning()

BOOL ProcessRunning ( ULONG  ProcessId)

Definition at line 495 of file procpage.c.

496 {
498  DWORD exitCode;
499 
500  if (ProcessId == 0) {
501  return TRUE;
502  }
503 
505  if (hProcess == NULL) {
506  return FALSE;
507  }
508 
509  if (GetExitCodeProcess(hProcess, &exitCode)) {
511  return (exitCode == STILL_ACTIVE);
512  }
513 
515  return FALSE;
516 }
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2706
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:407
#define PROCESS_ALL_ACCESS
Definition: nt_native.h:1324
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
Definition: proc.c:1168
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
smooth NULL
Definition: ftsmooth.c:416
#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

Referenced by UpdateProcesses().

◆ ProcGetIndexByProcessId()

int ProcGetIndexByProcessId ( DWORD  dwProcessId)

Definition at line 78 of file procpage.c.

79 {
80  int i;
81  LVITEM item;
83 
85  {
86  memset(&item, 0, sizeof(LV_ITEM));
87  item.mask = LVIF_PARAM;
88  item.iItem = i;
91  if (pData->ProcessId == dwProcessId)
92  {
93  return i;
94  }
95  }
96  return 0;
97 }
#define LV_ITEM
Definition: commctrl.h:2333
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
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_GetItemCount(hwnd)
Definition: commctrl.h:2303
if(!(yy_init))
Definition: macro.lex.yy.c:714
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2390
#define LVIF_PARAM
Definition: commctrl.h:2307
#define LVITEM
Definition: commctrl.h:2371
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:38

Referenced by ApplicationPage_OnGotoProcess().

◆ RefreshProcessPage()

void RefreshProcessPage ( void  )

Definition at line 408 of file procpage.c.

409 {
410 #ifdef RUN_PROC_PAGE
411  /* Signal the event so that our refresh thread */
412  /* will wake up and refresh the process page */
414 #endif
415 }
static DWORD dwProcessThread
Definition: procpage.c:48
#define WM_TIMER
Definition: winuser.h:1724
#define PostThreadMessage
Definition: winuser.h:5808

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

◆ UpdateProcesses()

void UpdateProcesses ( )

Definition at line 439 of file procpage.c.

440 {
441  int i;
442  ULONG l;
443  LV_ITEM item;
445 
447 
448  /* Remove old processes */
450  {
451  memset(&item, 0, sizeof (LV_ITEM));
452  item.mask = LVIF_PARAM;
453  item.iItem = i;
456  if (!ProcessRunning(pData->ProcessId))
457  {
460  }
461  }
462 
463  /* Check for difference in listview process and performance process counts */
465  {
466  /* Add new processes by checking against the current items */
467  for (l = 0; l < PerfDataGetProcessCount(); l++)
468  {
469  AddProcess(l);
470  }
471  }
472 
474  {
476  }
477 
479 
480  /* Select first item if any */
483  {
486  }
487  /*
488  else
489  {
490  bProcessPageSelectionMade = FALSE;
491  }
492  */
493 }
#define LV_ITEM
Definition: commctrl.h:2333
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2430
#define TRUE
Definition: types.h:120
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define WM_SETREDRAW
Definition: winuser.h:1598
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
#define LVNI_SELECTED
Definition: commctrl.h:2420
int ProcessRunning(ULONG ProcessId)
Definition: procpage.c:495
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: procpage.c:736
BOOL bProcessPageSelectionMade
Definition: procpage.c:42
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_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2669
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2315
#define ListView_DeleteItem(hwnd, i)
Definition: commctrl.h:2407
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2303
#define LVNI_FOCUSED
Definition: commctrl.h:2419
ULONG PerfDataGetProcessCount(void)
Definition: perfdata.c:472
r l[0]
Definition: byte_order.h:167
void AddProcess(ULONG Index)
Definition: procpage.c:518
#define GetProcessHeap()
Definition: compat.h:404
if(!(yy_init))
Definition: macro.lex.yy.c:714
static ATOM item
Definition: dde.c:856
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2390
#define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
Definition: commctrl.h:2699
#define SendMessage
Definition: winuser.h:5818
#define LVIF_PARAM
Definition: commctrl.h:2307
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:38
#define HeapFree(x, y, z)
Definition: compat.h:403
#define LVIS_FOCUSED
Definition: commctrl.h:2314

Referenced by ProcessPageRefreshThread().

Variable Documentation

◆ bProcessPageSelectionMade

BOOL bProcessPageSelectionMade = FALSE

Definition at line 42 of file procpage.c.

Referenced by UpdateProcesses().

◆ dwProcessThread

DWORD dwProcessThread
static

Definition at line 48 of file procpage.c.

Referenced by ProcessPageWndProc(), and RefreshProcessPage().

◆ hProcessPage

HWND hProcessPage

◆ hProcessPageEndProcessButton

HWND hProcessPageEndProcessButton

Definition at line 40 of file procpage.c.

Referenced by ProcessPageUpdate(), and ProcessPageWndProc().

◆ hProcessPageHeaderCtrl

◆ hProcessPageListCtrl

◆ hProcessPageShowAllProcessesButton

HWND hProcessPageShowAllProcessesButton

Definition at line 41 of file procpage.c.

Referenced by ProcessPageWndProc().

◆ hProcessThread

HANDLE hProcessThread = NULL
static

Definition at line 47 of file procpage.c.

Referenced by ProcessPageWndProc().

◆ nProcessPageHeight

int nProcessPageHeight
static

Definition at line 45 of file procpage.c.

Referenced by ProcessPageWndProc().

◆ nProcessPageWidth

int nProcessPageWidth
static

Definition at line 44 of file procpage.c.

Referenced by ProcessPageWndProc().