c++ Programming Glossary: openprocesstoken
How to turn off pc via windows API? http://stackoverflow.com/questions/1503839/how-to-turn-off-pc-via-windows-api i need to make it in the next order to get the parameter OpenProcessToken LookupPrivilegeValue AdjustTokenPrivileges but there are a lot..
Making a HANDLE RAII-compliant using shared_ptr with a custom deleter http://stackoverflow.com/questions/1562421/making-a-handle-raii-compliant-using-shared-ptr-with-a-custom-deleter which was created via the definition at the top. Example 2 OpenProcessToken last argument is a PHANDLE . medium ugly with the cast. OpenProcessToken.. last argument is a PHANDLE . medium ugly with the cast. OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY PHANDLE.. It should be something like this instead HANDLE h OpenProcessToken .... h shared_ptr void safe_h h CloseHandle or to assign to..
How can I get the SID of the current Windows account? http://stackoverflow.com/questions/251248/how-can-i-get-the-sid-of-the-current-windows-account hold of the current token handle use OpenThreadToken or OpenProcessToken . If you prefer ATL it has the CAccessToken class which has..
C++ Get Username From Process http://stackoverflow.com/questions/2686096/c-get-username-from-process . c winapi processes share improve this question Use OpenProcessToken to get the token obviously then GetTokenInformation with the..
Windows Vista/Win7 Privilege Problem: SeDebugPrivilege & OpenProcess http://stackoverflow.com/questions/2932461/windows-vista-win7-privilege-problem-sedebugprivilege-openprocess hToken NULL TOKEN_PRIVILEGES tokenPriv LUID luidDebug if OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES hToken FALSE if LookupPrivilegeValue..
Detecting user name from process ID http://stackoverflow.com/questions/3172392/detecting-user-name-from-process-id access right. Once you have that handle you can call OpenProcessToken requesting the TOKEN_QUERY access right. Finally you can then..
Detect if program is running with full administrator rights http://stackoverflow.com/questions/4230602/detect-if-program-is-running-with-full-administrator-rights question Win9x Everyone is admin NT4 OpenThreadToken OpenProcessToken GetTokenInformation ... TokenGroups ... on DOMAIN_ALIAS_RID_ADMINS.. DOMAIN_ALIAS_RID_ADMINS SID in a loop 2000 OpenThreadToken OpenProcessToken CheckTokenMembership on DOMAIN_ALIAS_RID_ADMINS SID Other alternatives..
How can I get a process handle by its name in C++? http://stackoverflow.com/questions/865152/how-can-i-get-a-process-handle-by-its-name-in-c HANDLE hToken LUID luid TOKEN_PRIVILEGES tkp OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY hToken..
How can I hook Windows functions in C/C++? http://stackoverflow.com/questions/873658/how-can-i-hook-windows-functions-in-c-c HANDLE hToken LUID luid TOKEN_PRIVILEGES tkp OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY hToken..
|