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?