17#define STATUS_WINDOW 2001
50#define ETDT_DISABLE 0x00000001
51#define ETDT_ENABLE 0x00000002
52#define ETDT_USETABTEXTURE 0x00000004
53#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
111 TCHAR szTaskmgr[128];
116 if (hTaskMgr !=
NULL)
362 HMENU hMenu, hPopupMenu;
519 HMENU hUpdateSpeedMenu;
520 HMENU hCPUHistoryMenu;
567 item.pszText = szTemp;
572 item.pszText = szTemp;
577 item.pszText = szTemp;
587#define PAGE_OFFSET_LEFT 17
588#define PAGE_OFFSET_TOP 72
589#define PAGE_OFFSET_WIDTH (PAGE_OFFSET_LEFT*2)
590#define PAGE_OFFSET_HEIGHT (PAGE_OFFSET_TOP+32)
786 WCHAR szSubKey[] =
L"Software\\ReactOS\\TaskManager";
849 WCHAR szSubKey[] =
L"Software\\ReactOS\\TaskManager";
880 if ((
LOWORD(nFlags) == 0xFFFF && hSysMenu ==
NULL) ||
914 HMENU hUpdateSpeedMenu;
1075 (
LPWSTR)&lpMessageBuffer,
1079 if (lpMessageBuffer)
LocalFree(lpMessageBuffer);
1097 if (!dwRet || ( (
long)
dwSize < (
long)dwRet+14)) {
1111 DWORD dwExitCodeThread = 0;
1129 return dwExitCodeThread;
void ProcessPage_OnSetAffinity(void)
void RefreshApplicationPage(void)
void ApplicationPage_OnEndTask(void)
void ApplicationPage_OnWindowsCascade(void)
void ApplicationPage_OnWindowsBringToFront(void)
void ApplicationPage_OnWindowsMinimize(void)
void ApplicationPage_OnView(DWORD dwMode)
void ApplicationPage_OnWindowsTile(DWORD dwMode)
INT_PTR CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
HWND hApplicationPageListCtrl
void ApplicationPage_OnGotoProcess(void)
void ApplicationPage_OnSwitchTo(void)
void ApplicationPage_OnWindowsMaximize(void)
void ProcessPage_OnDebug(void)
#define ID_APPLICATION_PAGE_SWITCHTO
#define IDS_MENU_SELECTCOLUMNS
#define IDD_APPLICATION_PAGE
#define IDD_PERFORMANCE_PAGE
#define ID_PROCESS_PAGE_SETPRIORITY_NORMAL
#define ID_PROCESS_PAGE_PROPERTIES
#define ID_SHUTDOWN_REBOOT
#define ID_SHUTDOWN_EJECT_COMPUTER
#define ID_WINDOWS_MINIMIZE
#define ID_SHUTDOWN_SWITCHUSER
#define ID_VIEW_SHOWKERNELTIMES
#define ID_PROCESS_PAGE_SETPRIORITY_REALTIME
#define IDS_MENU_SHOWKERNELTIMES
#define ID_OPTIONS_ALWAYSONTOP
#define ID_VIEW_UPDATESPEED_PAUSED
#define ID_WINDOWS_MAXIMIZE
#define ID_OPTIONS_MINIMIZEONUSE
#define IDS_TAB_PERFORMANCE
#define ID_OPTIONS_SHOW16BITTASKS
#define IDS_TAB_PROCESSES
#define ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU
#define ID_PROCESS_PAGE_ENDPROCESS
#define ID_WINDOWS_BRINGTOFRONT
#define ID_WINDOWS_TILEHORIZONTALLY
#define ID_APPLICATION_PAGE_ENDTASK
#define IDS_MENU_CPUHISTORY
#define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
#define ID_VIEW_UPDATESPEED_HIGH
#define ID_SHUTDOWN_LOGOFF
#define ID_OPTIONS_HIDEWHENMINIMIZED
#define IDS_MENU_SMALLICONS
#define IDS_MENU_ONEGRAPHPERCPU
#define ID_SHUTDOWN_LOCKCOMPUTER
#define ID_SHUTDOWN_DISCONNECT
#define ID_SHUTDOWN_STANDBY
#define ID_VIEW_CPUHISTORY_ONEGRAPHALL
#define IDS_MENU_ONEGRAPHALLCPUS
#define ID_PROCESS_PAGE_DEBUG
#define ID_WINDOWS_TILEVERTICALLY
#define ID_PROCESS_PAGE_OPENFILELOCATION
#define ID_VIEW_UPDATESPEED_NORMAL
#define ID_PROCESS_PAGE_ENDPROCESSTREE
#define IDD_TASKMGR_DIALOG
#define ID_VIEW_UPDATESPEED_LOW
#define ID_PROCESS_PAGE_SETAFFINITY
#define ID_SHUTDOWN_POWEROFF
#define IDS_MENU_16BITTASK
#define ID_APPLICATION_PAGE_GOTOPROCESS
#define ID_PROCESS_PAGE_SETPRIORITY_LOW
#define ID_SHUTDOWN_HIBERNATE
#define ID_VIEW_SELECTCOLUMNS
#define ID_PROCESS_PAGE_SETPRIORITY_HIGH
#define ID_WINDOWS_CASCADE
#define IDS_MENU_LARGEICONS
#define ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
void TaskManager_OnFileNew(void)
VOID ShutDown_Reboot(VOID)
VOID ShutDown_StandBy(VOID)
VOID ShutDown_SwitchUser(VOID)
VOID ShutDown_EjectComputer(VOID)
VOID ShutDown_Hibernate(VOID)
VOID ShutDown_PowerOff(VOID)
VOID ShutDown_LogOffUser(VOID)
VOID ShutDown_Disconnect(VOID)
VOID ShutDown_LockComputer(VOID)
#define RegCloseKey(hKey)
const PresetColumnEntry ColumnPresets[COLUMN_NMAX]
void ProcessPage_OnViewSelectColumns(void)
VOID WINAPI InitCommonControls(void)
#define ERROR_INSUFFICIENT_BUFFER
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
static const WCHAR Title[]
#define GetProcAddress(x, y)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
BOOL WINAPI SetProcessShutdownParameters(IN DWORD dwLevel, IN DWORD dwFlags)
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
void ProcessPage_OnEndProcessTree(void)
void ProcessPage_OnEndProcess(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 i
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_In_ BOOL _In_ HANDLE hProcess
#define ERROR_ALREADY_EXISTS
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
#define PROCESS_ALL_ACCESS
#define REG_OPTION_NON_VOLATILE
void PerfDataDeallocCommandLineCache()
BOOL PerfDataInitialize(void)
void PerfDataRefresh(void)
void PerfDataUninitialize(void)
void PerformancePage_OnViewShowKernelTimes(void)
INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
void PerformancePage_OnViewCPUHistoryOneGraphPerCPU(void)
void PerformancePage_OnViewCPUHistoryOneGraphAll(void)
void RefreshPerformancePage(void)
void DoSetPriority(DWORD priority)
void ProcessPage_OnOpenFileLocation(void)
INT_PTR CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
HWND hProcessPageHeaderCtrl
void RefreshProcessPage(void)
void ProcessPage_OnProperties(void)
HWND hProcessPageListCtrl
_Out_opt_ int _Out_opt_ int * cy
#define TabCtrl_GetCurSel(hwnd)
#define CreateStatusWindow
#define TabCtrl_InsertItem(hwnd, iItem, pitem)
#define TabCtrl_SetCurFocus(hwnd, i)
int ColumnSizeArray[COLUMN_NMAX]
BOOL ShowProcessesFromAllUsers
int ColumnOrderArray[COLUMN_NMAX]
BOOL CPUHistory_OneGraphPerCPU
BOOL Columns[COLUMN_NMAX]
DWORD dwNumberOfProcessors
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
HRESULT(WINAPI * ETDTProc)(HWND, DWORD)
INT_PTR CALLBACK TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
void TaskManager_OnRestoreMainWindow(void)
void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
BOOL EnableDialogTheme(HWND hwnd)
#define PAGE_OFFSET_WIDTH
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
void TaskManager_OnViewUpdateSpeed(DWORD dwSpeed)
TASKMANAGER_SETTINGS TaskManagerSettings
void OnMove(WPARAM nType, int cx, int cy)
void OnSize(WPARAM nType, int cx, int cy)
VOID ShowWin32Error(DWORD dwError)
#define PAGE_OFFSET_HEIGHT
static void SetUpdateSpeed(HWND hWnd)
void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr)
BOOL ConfirmMessageBox(HWND hWnd, LPCWSTR Text, LPCWSTR Title, UINT Type)
void TaskManager_OnTabWndSelChange(void)
LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize)
BOOL TrayIcon_RemoveIcon(VOID)
BOOL TrayIcon_UpdateIcon(VOID)
BOOL TrayIcon_AddIcon(VOID)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static ETDTProc fnEnableThemeDialogTexture
#define NORMAL_PRIORITY_CLASS
DWORD WINAPI GetLastError(void)
#define REALTIME_PRIORITY_CLASS
#define BELOW_NORMAL_PRIORITY_CLASS
#define HIGH_PRIORITY_CLASS
DWORD WINAPI GetCurrentProcessId(void)
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define FORMAT_MESSAGE_ARGUMENT_ARRAY
#define IDLE_PRIORITY_CLASS
#define ABOVE_NORMAL_PRIORITY_CLASS
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define HKEY_CURRENT_USER
HMENU WINAPI CreatePopupMenu(void)
#define GetWindowLongPtrW
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
int WINAPI GetMenuStringW(_In_ HMENU hMenu, _In_ UINT uIDItem, _Out_writes_opt_(cchMax) LPWSTR lpString, _In_ int cchMax, _In_ UINT flags)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define DialogBoxW(i, t, p, f)
BOOL WINAPI InsertMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI OpenIcon(_In_ HWND)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define PostThreadMessage
#define WM_SYSCOLORCHANGE
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI IsZoomed(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI DrawMenuBar(_In_ HWND)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
struct tagNMHDR * LPNMHDR
#define CreateDialogW(h, n, w, f)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define WPF_RESTORETOMAXIMIZED
#define SWP_NOOWNERZORDER
#define MDITILE_HORIZONTAL
BOOL WINAPI ModifyMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
struct _WINDOWPLACEMENT WINDOWPLACEMENT
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
BOOL WINAPI BringWindowToTop(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI GetMenu(_In_ HWND)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED