CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2022
    Posts
    2

    NtSetInformationthread

    Hello,

    I'm trying to change I/o priority of the current thread but it's not working. The status keeps returning -1073741819 which most likely translates to STATUS_ACCESS_VIOLATION.

    The code I am using:
    HTML Code:
    IO_PRIORITY_HINT priority;
    priority = IoPriorityHigh;
    NTSTATUS status = NtSetInformationThread(ZwCurrentThread(), ThreadIoPriority, &priority, sizeof(priority));
    Any ideas what could be the reason and how to make this work?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: NtSetInformationthread

    Did you try to do it under the Admin account?
    Victor Nijegorodov

  3. #3
    Join Date
    Mar 2022
    Posts
    2

    Re: NtSetInformationthread

    Quote Originally Posted by VictorN View Post
    Did you try to do it under the Admin account?
    I am running that driver code from a program with admin rights, so I assume so.

    I've tested this code:

    HTML Code:
    NtSetInformationThread(ZwCurrentThread(), ThreadHideFromDebugger, NULL, 0)
    That works. Anyway the kernel code doesn't even run if I try to run the program without admin rights.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured