1 #include "windows.h" 2 #include "iostream" 3 4 void main(){ 5 HANDLE hprocessThis=GetCurrentProcess(); 6 7 DWORD dwPriority=GetPriorityClass(hprocessThis); 8 9 printf("Currrent process priority:"); 10 11 switch(dwPriority){ 12 case HIGH_PRIORITY_CLASS: 13 printf("High "); 14 break; 15 case NORMAL_PRIORITY_CLASS: 16 printf("Normal "); 17 break; 18 19 case IDLE_PRIORITY_CLASS: 20 printf("Idle "); 21 break; 22 case REALTIME_PRIORITY_CLASS: 23 printf("Realtime "); 24 break; 25 default: 26 printf("<unknown> "); 27 break; 28 } 29 30 getchar(); 31 }