32 #define STATUS_WINDOW 2001 65 #define ETDT_DISABLE 0x00000001 66 #define ETDT_ENABLE 0x00000002 67 #define ETDT_USETABTEXTURE 0x00000004 68 #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE) 126 TCHAR szTaskmgr[128];
131 if (hTaskMgr !=
NULL)
373 HMENU hMenu, hPopupMenu;
557 lpRect->
bottom - lpRect->
top, clrTopLeft, clrBottomRight);
582 HMENU hUpdateSpeedMenu;
583 HMENU hCPUHistoryMenu;
630 item.pszText = szTemp;
635 item.pszText = szTemp;
640 item.pszText = szTemp;
650 #define PAGE_OFFSET_LEFT 17 651 #define PAGE_OFFSET_TOP 72 652 #define PAGE_OFFSET_WIDTH (PAGE_OFFSET_LEFT*2) 653 #define PAGE_OFFSET_HEIGHT (PAGE_OFFSET_TOP+32) 661 #ifdef __GNUC__TEST__ 737 _snwprintf(szLogOffItem,
sizeof(szLogOffItem)/
sizeof(szLogOffItem[0]), szTemp, lpUserName);
738 szLogOffItem[
sizeof(szLogOffItem)/
sizeof(szLogOffItem[0]) - 1] =
UNICODE_NULL;
742 _snwprintf(szLogOffItem,
sizeof(szLogOffItem)/
sizeof(szLogOffItem[0]), szTemp,
L"n/a");
749 _snwprintf(szLogOffItem,
sizeof(szLogOffItem)/
sizeof(szLogOffItem[0]), szTemp,
L"n/a");
781 #ifdef __GNUC__TEST__ 851 WCHAR szSubKey[] =
L"Software\\ReactOS\\TaskManager";
914 WCHAR szSubKey[] =
L"Software\\ReactOS\\TaskManager";
961 nParts[2] = rc.
right;
977 lpsz =
wcschr(lpsz,
'\n');
988 HMENU hUpdateSpeedMenu;
1141 (
LPWSTR)&lpMessageBuffer,
1145 if (lpMessageBuffer)
LocalFree(lpMessageBuffer);
1163 if (!dwRet || ( (
long)
dwSize < (
long)dwRet+14)) {
1177 DWORD dwExitCodeThread = 0;
1195 return dwExitCodeThread;
void ApplicationPage_OnWindowsCascade(void)
INT_PTR CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define ID_SHUTDOWN_SWITCHUSER
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 WM_SYSCOLORCHANGE
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define REALTIME_PRIORITY_CLASS
#define ID_OPTIONS_HIDEWHENMINIMIZED
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
BOOL WINAPI DrawMenuBar(_In_ HWND)
#define IDS_MENU_SHOWKERNELTIMES
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
BOOL WINAPI ModifyMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define IDD_TASKMGR_DIALOG
struct _WINDOWPLACEMENT WINDOWPLACEMENT
#define PROCESS_ALL_ACCESS
#define IDS_MENU_ONEGRAPHALLCPUS
void OnMove(WPARAM nType, int cx, int cy)
BOOL WINAPI InsertMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight)
#define ID_PROCESS_PAGE_SETPRIORITY_NORMAL
HDC WINAPI GetDC(_In_opt_ HWND)
void TaskManager_OnViewUpdateSpeed(DWORD dwSpeed)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define HKEY_CURRENT_USER
void ProcessPage_OnEndProcessTree(void)
#define FORMAT_MESSAGE_ARGUMENT_ARRAY
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define ID_OPTIONS_ALWAYSONTOP
#define ID_SHUTDOWN_POWEROFF
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define ID_SHUTDOWN_DISCONNECT
void DoSetPriority(DWORD priority)
#define ID_APPLICATION_PAGE_GOTOPROCESS
VOID ShutDown_LogOffUser(VOID)
BOOL PerfDataInitialize(void)
#define ID_VIEW_UPDATESPEED_HIGH
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
int ColumnSizeArray[COLUMN_NMAX]
DWORD WINAPI GetLastError(VOID)
VOID ShutDown_PowerOff(VOID)
void PerformancePage_OnViewCPUHistoryOneGraphPerCPU(void)
_In_ BOOL _In_ HANDLE hProcess
GLint GLint GLint GLint GLint x
#define ID_WINDOWS_MAXIMIZE
HWND WINAPI SetFocus(_In_opt_ HWND)
#define TabCtrl_GetCurSel(hwnd)
VOID ShutDown_EjectComputer(VOID)
#define WPF_RESTORETOMAXIMIZED
#define ID_OPTIONS_SHOW16BITTASKS
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
#define ID_PROCESS_PAGE_SETPRIORITY_HIGH
void RefreshProcessPage(void)
#define GetWindowLongPtrW
#define NORMAL_PRIORITY_CLASS
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
void FillSolidRect2(HDC hDC, int x, int y, int cx, int cy, COLORREF clr)
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
void PerfDataUninitialize(void)
HWND hApplicationPageListCtrl
#define PAGE_OFFSET_HEIGHT
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
DWORD WINAPI GetSysColor(_In_ int)
void ApplicationPage_OnWindowsMinimize(void)
BOOL TrayIcon_ShellUpdateTrayIcon(void)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define ID_WINDOWS_TILEVERTICALLY
struct tagNMHDR * LPNMHDR
static void SetUpdateSpeed(HWND hWnd)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
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)
#define ID_PROCESS_PAGE_ENDPROCESS
#define ABOVE_NORMAL_PRIORITY_CLASS
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define ID_SHUTDOWN_HIBERNATE
BOOL WINAPI SetProcessShutdownParameters(IN DWORD dwLevel, IN DWORD dwFlags)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
void ProcessPage_OnDebug(void)
#define SE_PRIVILEGE_ENABLED
HRESULT(WINAPI * ETDTProc)(HWND, DWORD)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
LONG WINAPI RegCloseKey(HKEY hKey)
int WINAPI GetMenuStringW(_In_ HMENU hMenu, _In_ UINT uIDItem, _Out_writes_opt_(cchMax) LPWSTR lpString, _In_ int cchMax, _In_ UINT flags)
#define ID_PROCESS_PAGE_SETPRIORITY_REALTIME
#define ID_OPTIONS_MINIMIZEONUSE
#define ID_VIEW_CPUHISTORY_ONEGRAPHALL
#define CreateStatusWindow
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL TrayIcon_ShellRemoveTrayIcon(void)
#define MDITILE_HORIZONTAL
HWND hProcessPageHeaderCtrl
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
_Out_opt_ int _Out_opt_ int * cy
BOOL WINAPI BringWindowToTop(_In_ HWND)
#define HIGH_PRIORITY_CLASS
#define ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU
VOID ShutDown_Disconnect(VOID)
const PresetColumnEntry ColumnPresets[COLUMN_NMAX]
VOID ShutDown_Hibernate(VOID)
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
void ProcessPage_OnEndProcess(void)
#define ID_VIEW_UPDATESPEED_LOW
#define ID_PROCESS_PAGE_SETAFFINITY
void Draw3dRect2(HDC hDC, LPRECT lpRect, COLORREF clrTopLeft, COLORREF clrBottomRight)
void ProcessPage_OnSetAffinity(void)
#define ID_SHUTDOWN_STANDBY
#define IDD_APPLICATION_PAGE
#define FORMAT_MESSAGE_FROM_SYSTEM
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define DialogBoxW(i, t, p, f)
void ApplicationPage_OnWindowsTile(DWORD dwMode)
#define REG_OPTION_NON_VOLATILE
void OnSize(WPARAM nType, int cx, int cy)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
void ApplicationPage_OnView(DWORD dwMode)
void TaskManager_OnRestoreMainWindow(void)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
#define ID_PROCESS_PAGE_DEBUG
void RefreshApplicationPage(void)
#define IDLE_PRIORITY_CLASS
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define ID_SHUTDOWN_EJECT_COMPUTER
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
#define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
void ApplicationPage_OnEndTask(void)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI OpenIcon(_In_ HWND)
void RefreshPerformancePage(void)
#define PostThreadMessage
static ETDTProc fnEnableThemeDialogTexture
#define ID_VIEW_SHOWKERNELTIMES
BOOL Columns[COLUMN_NMAX]
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
unsigned __int3264 UINT_PTR
#define ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
#define IDS_MENU_SMALLICONS
BOOL ShowProcessesFromAllUsers
void ApplicationPage_OnGotoProcess(void)
VOID ShutDown_StandBy(VOID)
#define IDS_MENU_ONEGRAPHPERCPU
void PerfDataDeallocCommandLineCache()
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define IDS_MENU_LARGEICONS
#define ID_VIEW_SELECTCOLUMNS
#define CreateDialogW(h, n, w, f)
INT_PTR CALLBACK TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
#define GetCurrentProcess()
#define ID_VIEW_UPDATESPEED_PAUSED
VOID ShutDown_LockComputer(VOID)
void ApplicationPage_OnWindowsBringToFront(void)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
void PerformancePage_OnViewShowKernelTimes(void)
#define IDS_MENU_CPUHISTORY
INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
void PerformancePage_OnViewCPUHistoryOneGraphAll(void)
VOID ShowWin32Error(DWORD dwError)
void TaskManager_OnEnterMenuLoop(HWND hWnd)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
#define ID_WINDOWS_CASCADE
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
VOID ShutDown_SwitchUser(VOID)
#define IDS_TAB_PERFORMANCE
#define IDS_MENU_16BITTASK
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
#define IDD_PERFORMANCE_PAGE
void TaskManager_OnTabWndSelChange(void)
#define IDS_TAB_PROCESSES
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 ApplicationPage_OnWindowsMaximize(void)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
void TaskManager_OnFileNew(void)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
#define ID_PROCESS_PAGE_ENDPROCESSTREE
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize)
BOOL WINAPI IsZoomed(_In_ HWND)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
#define ID_WINDOWS_MINIMIZE
BOOL TrayIcon_ShellAddTrayIcon(void)
GLint GLint GLint GLint GLint GLint y
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ID_APPLICATION_PAGE_ENDTASK
#define PAGE_OFFSET_WIDTH
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define TabCtrl_InsertItem(hwnd, iItem, pitem)
DWORD dwNumberOfProcessors
#define ID_SHUTDOWN_LOCKCOMPUTER
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define BELOW_NORMAL_PRIORITY_CLASS
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL EnableDialogTheme(HWND hwnd)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
TASKMANAGER_SETTINGS TaskManagerSettings
#define GetProcAddress(x, y)
VOID ShutDown_Reboot(VOID)
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 IDS_MENU_SELECTCOLUMNS
VOID WINAPI InitCommonControls(void)
#define MAKEINTRESOURCEW(i)
int ColumnOrderArray[COLUMN_NMAX]
#define ID_WINDOWS_BRINGTOFRONT
#define ERROR_ALREADY_EXISTS
void ProcessPage_OnViewSelectColumns(void)
#define ID_WINDOWS_TILEHORIZONTALLY
HWND hProcessPageListCtrl
#define ID_VIEW_UPDATESPEED_NORMAL
HMENU WINAPI GetMenu(_In_ HWND)
#define TOKEN_ADJUST_PRIVILEGES
#define ID_APPLICATION_PAGE_SWITCHTO
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
#define ID_SHUTDOWN_REBOOT
BOOL CPUHistory_OneGraphPerCPU
void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr)
#define HeapFree(x, y, z)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define ID_PROCESS_PAGE_SETPRIORITY_LOW
void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
DWORD WINAPI GetCurrentProcessId(VOID)
void PerfDataRefresh(void)
#define ID_SHUTDOWN_LOGOFF
void TaskManager_OnExitMenuLoop(HWND hWnd)
#define TabCtrl_SetCurFocus(hwnd, i)
#define SWP_NOOWNERZORDER
#define ERROR_INSUFFICIENT_BUFFER
void ApplicationPage_OnSwitchTo(void)