728x90
프로그램의 중요도가 높아서 프로세스 우선순위를 변경하려고 할 때는
아래와 같이 프로그램 시작 위치에서 설정을 하면 됩니다
CMyClass::CMyClass(void)
{
SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
}
설정값의 경우 WinBase.h 헤더 파일에 존재하며
아래의 값들로 설정이 가능합니다
#define NORMAL_PRIORITY_CLASS 0x00000020
#define IDLE_PRIORITY_CLASS 0x00000040
#define HIGH_PRIORITY_CLASS 0x00000080
#define REALTIME_PRIORITY_CLASS 0x00000100
#define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
제 글이 도움이 되셨다면 댓글 & 공감 부탁드려요 😀
728x90
반응형
'Application > MFC' 카테고리의 다른 글
[MFC] x64 OutputDebugString 디버깅 오류 (0) | 2023.04.27 |
---|---|
[MFC] 한글 로그 파일 작성 (WideCharToMultiByte) (0) | 2023.04.26 |
[MFC] ReverseMemcpy 메모리값 반전 (0) | 2023.04.17 |
[MFC] 디스크 Offline / Online (0) | 2023.03.22 |
[MFC] 볼륨으로 디스크 번호 가져오기 (Get Volume Disk Number) (0) | 2023.03.21 |