34 (x1 < x2 ? -1 : (x1 > x2 ? 1 : 0)) 96 if (
pData->ProcessId == dwProcessId)
116 lvitem.iItem =
Index;
226 cx = rc.
left + nXDifference;
227 cy = rc.
top + nYDifference;
234 cy = rc.
top + nYDifference;
280 ColumnIndex = pnmdi->item.iSubItem;
335 if ((
k % 3 == 0) && (
j > 0))
351 DWORD dwProcessPriorityClass;
352 WCHAR strDebugger[260];
353 DWORD dwDebuggerSize;
372 switch (dwProcessPriorityClass) {
395 dwDebuggerSize =
sizeof(strDebugger);
399 if (
wcsstr(strDebugger,
L"DRWTSN32"))
543 bAlreadyInList =
TRUE;
587 wsprintfW(lpText,
L"%lu:%02lu:%02lu", dwHours, dwMinutes, dwSeconds);
709 *dwSeconds = (
DWORD)(((largeint.
QuadPart % 36000000000
L) % 600000000
L) / 10000000
L);
729 ret =
CMP(dwHours1, dwHours2);
732 ret =
CMP(dwMinutes1, dwMinutes2);
735 ret =
CMP(dwSeconds1, dwSeconds2);
975 for (szDrive[0] =
L'A'; szDrive[0] <=
L'`'; szDrive[0]++)
986 if (lpDosPath && (
dwLength >= dwRet))
989 szDrive, lpDevicePath +
len);
1037 sizeof(StaticBuffer) -
sizeof(
WCHAR),
1105 if (dwProcessId == 0)
1109 if (dwProcessId == 4)
1111 static const WCHAR szKernelExe[] =
L"\\ntoskrnl.exe";
1126 dwRet = uLength +
_countof(szKernelExe) - 1;
1128 if (lpExePath && (
dwLength >= dwRet))
1131 pszSystemDir, szKernelExe);
1178 info.lpVerb =
L"properties";
1179 info.lpFile = pszExePath;
1180 info.lpParameters =
L"";
#define COLUMN_NONPAGEDPOOL
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
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.
ULONG PerfDataGetBasePriority(ULONG Index)
INT_PTR CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
void ProcessPage_OnProperties(void)
ULONGLONG OtherOperationCount
#define ListView_GetNextItem(hwnd, i, flags)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define COLUMN_GDIOBJECTS
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
#define REALTIME_PRIORITY_CLASS
DWORD GetSelectedProcessId(void)
#define COLUMN_PAGEFAULTSDELTA
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
#define COLUMN_PAGEFAULTS
#define STATUS_INFO_LENGTH_MISMATCH
#define PROCESS_ALL_ACCESS
static int nProcessPageWidth
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define PROCESS_QUERY_INFORMATION
#define ID_PROCESS_PAGE_SETPRIORITY_NORMAL
HWND hProcessPageEndProcessButton
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
#define IDC_SHOWALLPROCESSES
#define COLUMN_COMMANDLINE
ULONG PerfDataGetWorkingSetSizeBytes(ULONG Index)
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define ListView_GetHeader(hwnd)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount)
ULONG PerfDataGetCPUUsage(ULONG Index)
_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)
struct PROCESS_PAGE_LIST_ITEM * LPPROCESS_PAGE_LIST_ITEM
#define LVS_EX_FULLROWSELECT
ULONGLONG WriteOperationCount
ULONG PerfDataGetPageFaultCount(ULONG Index)
static DWORD dwProcessThread
_In_ BOOL _In_ HANDLE hProcess
HWND hProcessPageShowAllProcessesButton
ULONG PerfDataGetProcessIndex(ULONG pid)
#define COLUMN_IOOTHERBYTES
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
ULONG PerfDataGetPageFaultCountDelta(ULONG Index)
#define ID_PROCESS_PAGE_SETPRIORITY_HIGH
void RefreshProcessPage(void)
#define ListView_InsertItem(hwnd, pitem)
#define NORMAL_PRIORITY_CLASS
#define COLUMN_USEROBJECTS
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index)
static int nProcessPageHeight
int ProcessRunning(ULONG ProcessId)
ULONG PerfDataGetGDIObjectCount(ULONG Index)
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.
struct tagNMHDR * LPNMHDR
#define ABOVE_NORMAL_PRIORITY_CLASS
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
#define _Out_writes_to_opt_(size, count)
void ProcessPageShowContextMenu(DWORD dwProcessId)
int largeintcmp(LARGE_INTEGER l1, LARGE_INTEGER l2)
BOOL bProcessPageSelectionMade
ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index)
#define COLUMN_THREADCOUNT
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ListView_GetSelectedCount(hwndLV)
#define ListView_SetItemState(hwndLV, i, data, mask)
#define ID_PROCESS_PAGE_SETPRIORITY_REALTIME
#define ListView_GetExtendedListViewStyle(hwndLV)
HWND hProcessPageHeaderCtrl
__MINGW_EXTENSION _CRTIMP wchar_t *__cdecl _ui64tow(_In_ unsigned __int64 _Val, _Pre_notnull_ _Post_z_ wchar_t *_DstBuf, _In_ int _Radix)
_Out_opt_ int _Out_opt_ int * cy
#define HIGH_PRIORITY_CLASS
BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount)
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)
#define LVS_EX_HEADERDRAGDROP
void SaveColumnSettings(void)
void ProcessPage_OnEndProcess(void)
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
#define ID_PROCESS_PAGE_SETAFFINITY
#define ListView_DeleteItem(hwnd, i)
#define ListView_GetItemCount(hwnd)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
ULONGLONG WriteTransferCount
ULONG PerfDataGetProcessCount(void)
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
BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters)
void UpdateColumnDataHints(void)
ULONG PerfDataGetThreadCount(ULONG Index)
void AddProcess(ULONG Index)
#define ID_PROCESS_PAGE_DEBUG
#define IDLE_PRIORITY_CLASS
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static DWORD DWORD * dwLength
#define NT_SUCCESS(StatCode)
_In_ WDFCOLLECTION _In_ ULONG Index
ULONG PerfDataGetProcessId(ULONG Index)
#define COLUMN_HANDLECOUNT
UINT ColumnDataHints[COLUMN_NMAX]
#define PostThreadMessage
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds)
#define ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index)
LARGE_INTEGER PerfDataGetCPUTime(ULONG Index)
#define IDR_PROCESS_PAGE_CONTEXT
ULONGLONG ReadTransferCount
int ProcGetIndexByProcessId(DWORD dwProcessId)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
static const WCHAR szDeviceName[]
WNDPROC OldProcessListWndProc
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.
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
_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
void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
_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)
ULONG PerfDataGetSessionId(ULONG Index)
struct _SHELLEXECUTEINFOW SHELLEXECUTEINFOW
#define COLUMN_IOWRITEBYTES
UNICODE_STRING * PUNICODE_STRING
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
void ProcessPageUpdate(void)
ULONG PerfDataGetHandleCount(ULONG Index)
struct _UNICODE_STRING UNICODE_STRING
static HANDLE hProcessThread
#define ListView_GetItem(hwnd, pitem)
BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount)
#define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
DWORD dwNumberOfProcessors
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
void ProcessPage_OnOpenFileLocation(void)
#define BELOW_NORMAL_PRIORITY_CLASS
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
BOOL WINAPI IsWindowVisible(_In_ HWND)
#define SEE_MASK_INVOKEIDLIST
TASKMANAGER_SETTINGS TaskManagerSettings
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
#define MAKEINTRESOURCEW(i)
ULONGLONG OtherTransferCount
#define ListView_GetSelectionMark(hwnd)
#define LPSTR_TEXTCALLBACK
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
DWORD WINAPI GetPriorityClass(IN HANDLE hProcess)
HWND hProcessPageListCtrl
#define COLUMN_BASEPRIORITY
INT_PTR CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
ULONG PerfDataGetUSERObjectCount(ULONG Index)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
ULONG PerfDataGetPagedPoolUsagePages(ULONG Index)
#define COLUMN_IOREADBYTES
#define HeapFree(x, y, z)
#define RegCloseKey(hKey)
#define ID_PROCESS_PAGE_SETPRIORITY_LOW
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define COLUMN_MEMORYUSAGE
#define COLUMN_VIRTUALMEMORYSIZE
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define COLUMN_PEAKMEMORYUSAGE
ULONGLONG ReadOperationCount
#define SWP_NOOWNERZORDER
#define HKEY_LOCAL_MACHINE
#define COLUMN_MEMORYUSAGEDELTA
BOOL PerfDataGetCommandLine(ULONG Index, LPWSTR lpCommandLine, ULONG nMaxCount)