ReactOS 0.4.15-dev-8222-g9164419
priority.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Task Manager
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Process Priority.
5 * COPYRIGHT: Copyright 1999-2001 Brian Palmer <brianp@reactos.org>
6 * Copyright 2005 Klemens Friedl <frik85@reactos.at>
7 */
8
9#include "precomp.h"
10
12{
13 DWORD dwProcessId;
15 WCHAR szText[260];
16 WCHAR szTitle[256];
17
18 dwProcessId = GetSelectedProcessId();
19
20 if (dwProcessId == 0)
21 return;
22
26 return;
27
29
30 if (!hProcess)
31 {
32 GetLastErrorText(szText, 260);
35 return;
36 }
37
39 {
40 GetLastErrorText(szText, 260);
43 }
44
46}
#define IDS_MSG_UNABLECHANGEPRIORITY
Definition: resource.h:255
#define IDS_MSG_TASKMGRWARNING
Definition: resource.h:252
#define IDS_MSG_WARNINGCHANGEPRIORITY
Definition: resource.h:256
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
Definition: proc.c:1692
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
#define PROCESS_SET_INFORMATION
Definition: pstypes.h:165
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
HWND hMainWnd
Definition: magnifier.c:32
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
static int priority
Definition: timer.c:163
void DoSetPriority(DWORD priority)
Definition: priority.c:11
DWORD GetSelectedProcessId(void)
Definition: procpage.c:88
BOOL ConfirmMessageBox(HWND hWnd, LPCWSTR Text, LPCWSTR Title, UINT Type)
Definition: taskmgr.c:1059
LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize)
Definition: taskmgr.c:1083
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define MB_YESNO
Definition: winuser.h:817
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_OK
Definition: winuser.h:790
#define MB_ICONWARNING
Definition: winuser.h:786
#define MB_ICONSTOP
Definition: winuser.h:803
__wchar_t WCHAR
Definition: xmlstorage.h:180