获得进程句柄

时间:2014-05-09 09:14:15   收藏:0   阅读:267
bubuko.com,布布扣
 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\n");
14             break;
15         case NORMAL_PRIORITY_CLASS:
16             printf("Normal\n");
17             break;
18 
19         case IDLE_PRIORITY_CLASS:
20             printf("Idle\n");
21             break;
22         case REALTIME_PRIORITY_CLASS:
23             printf("Realtime\n");
24             break;
25         default:
26             printf("<unknown>\n");
27             break;
28     }
29 
30     getchar();
31 }
bubuko.com,布布扣

 

获得进程句柄,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!