HANDLE hToken;<br> TOKEN_PRIVILEGES tkp,tkpNew;<br> LUID int64LpUid;<br><br> OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&hToken);<br> LookupPrivilegeValue(NULL,"SeShutdownPrivilege",&int64LpUid);<br> tkp.PrivilegeCount=1;<br> tkp.Privileges[0].Luid=int64LpUid;<br> tkp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;<br> AdjustTokenPrivileges(hToken,FALSE,&tkp,sizeof(tkp),&tkpNew,NULL);