ReactOS 0.4.15-dev-5865-g640e228
priority.c
Go to the documentation of this file.
1/*
2 * ReactOS Task Manager
3 *
4 * priority.c
5 *
6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
7 * 2005 Klemens Friedl <frik85@reactos.at>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#include "precomp.h"
25
27{
28 DWORD dwProcessId;
30 WCHAR szText[260];
31 WCHAR szTitle[256];
32
33 dwProcessId = GetSelectedProcessId();
34
35 if (dwProcessId == 0)
36 return;
37
41 return;
42
44
45 if (!hProcess)
46 {
47 GetLastErrorText(szText, 260);
50 return;
51 }
52
54 {
55 GetLastErrorText(szText, 260);
58 }
59
61}
#define IDS_MSG_UNABLECHANGEPRIORITY
Definition: resource.h:250
#define IDS_MSG_TASKMGRWARNING
Definition: resource.h:247
#define IDS_MSG_WARNINGCHANGEPRIORITY
Definition: resource.h:251
#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:26
DWORD GetSelectedProcessId(void)
Definition: procpage.c:103
LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize)
Definition: taskmgr.c:1155
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:811
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_OK
Definition: winuser.h:784
#define MB_ICONWARNING
Definition: winuser.h:780
#define MB_ICONSTOP
Definition: winuser.h:797
#define IDYES
Definition: winuser.h:829
__wchar_t WCHAR
Definition: xmlstorage.h:180