Changing scheduling priority of a process at runtime

I had a requirement sometime back to make my process have a higher priority at runtime, so went hunting around for an API which does this and found one with an intuitive name, “SetPriorityClass”. So what is process priority? Process priority is the value which determines priority of a process when it’s being scheduled. If […]
Continue reading…

 

Function for enabling privileges for your application!

Here is the code that does this… [sourcecode language=’cpp’]// Set up access void SetUpAccess() {     HANDLE hProcToken = 0;     if( !OpenProcessToken( GetCurrentProcess(),                            TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,                            &hProcToken ))     {         return;     }     // List of privileges, all of them, he he 😀     LPCTSTR lpctszPrivileges[] = { SE_CREATE_TOKEN_NAME,                                    […]
Continue reading…