ReactOS 0.4.15-dev-7887-g64a59a1
priority.c File Reference
#include "precomp.h"
Include dependency graph for priority.c:

Go to the source code of this file.

Functions

void DoSetPriority (DWORD priority)
 

Function Documentation

◆ DoSetPriority()

void DoSetPriority ( DWORD  priority)

Definition at line 11 of file priority.c.

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
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

Referenced by TaskManagerWndProc().