16 void Open(HANDLE hProc, DWORD access = TOKEN_ALL_ACCESS);
20 bool IsOpen()
const {
return m_h != NULL; }
24 void AdjustPrivilege(
const std::wstring& privilege, DWORD type = SE_PRIVILEGE_ENABLED);
void Open(HANDLE hProc, DWORD access=TOKEN_ALL_ACCESS)
open a process token handle
Definition: ProcessToken.cpp:12
ProcessToken()
Definition: ProcessToken.cpp:6
void Close()
close a process token handle
Definition: ProcessToken.cpp:31
void AdjustPrivilege(const std::wstring &privilege, DWORD type=SE_PRIVILEGE_ENABLED)
adjust a process token privilege
Definition: ProcessToken.cpp:42
bool IsOpen() const
returns true if process token handle is open
Definition: ProcessToken.h:20
virtual ~ProcessToken()
Definition: ProcessToken.cpp:23
HANDLE GetHandle() const
returns the process handle
Definition: ProcessToken.h:22
A process token.
Definition: ProcessToken.h:8