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…