Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://waleedassar.blogspot.com
- //http://www.twitter.com/waleedassar
- #define ThreadIoPriority 0x16
- int main()
- {
- //0xFF3FFF3C;---> No RundownFail, no NeedsWorkingSetAging.
- //0xFF3FFFFC;---> Includes RundownFail & NeedsWorkingSetAging.
- unsigned long prior=0xFF3FFF3C;
- int ret=ZwSetInformationThread(GetCurrentThread(),ThreadIoPriority,&prior,4);
- if(ret>=0)
- {
- unsigned long priorr=0;
- ret=ZwQueryInformationThread(GetCurrentThread(),ThreadIoPriority,&priorr,4,0);
- printf("Current Thread IO priority is %x\r\n",priorr);
- unsigned long xx=0;
- while(1)
- {
- printf("Hey %x\r\n",xx);
- Sleep(1000);
- xx++;
- }
- unsigned long xxx=0;
- scanf("%d\r\n",&xxx);
- }
- ExitProcess(0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement