src/Common/Lsa/ProcessToken.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 namespace AppSecInc 
00004 {
00005     namespace LSA
00006     {
00008         class ProcessToken
00009         {
00010         private:
00011             HANDLE m_h;
00012         public:
00013             ProcessToken();
00014             virtual ~ProcessToken();
00016             void Open(HANDLE hProc, DWORD access = TOKEN_ALL_ACCESS);
00018             void Close();
00020             bool IsOpen() const { return m_h != NULL; }
00022             HANDLE GetHandle() const { return m_h; }
00024             void AdjustPrivilege(const std::wstring& privilege, DWORD type = SE_PRIVILEGE_ENABLED);
00025         };
00026     }
00027 }
00028 


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com