Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

  1. // AdjustTokenPrivileges.h: interface for the CAdjustTokenPrivileges class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_ADJUSTTOKENPRIVILEGES_H__032C8A47_665B_46A2_89BC_0818BB3AB1E0__INCLUDED_)
  5. #define AFX_ADJUSTTOKENPRIVILEGES_H__032C8A47_665B_46A2_89BC_0818BB3AB1E0__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CAdjustTokenPrivileges
  10. {
  11. public:
  12. CAdjustTokenPrivileges( );
  13. virtual ~CAdjustTokenPrivileges();
  14. // Implementation
  15. public:
  16. DWORD AdjustPrivileges( LPCTSTR lpPrivelegeName, DWORD dwAttributes );
  17. DWORD DuplicateProcessToken( LPCTSTR lpPrivelegeName, DWORD dwAttributes );
  18. DWORD ResetToken();
  19. DWORD SetToken();
  20. // Attributes
  21. protected:
  22. DWORD m_dwAttributesPrev;
  23. bool m_bImpersonation;
  24. LUID m_luid;
  25. HANDLE m_hToken;
  26. HANDLE m_hTokenDuplicate;
  27. };
  28. #endif // !defined(AFX_ADJUSTTOKENPRIVILEGES_H__032C8A47_665B_46A2_89BC_0818BB3AB1E0__INCLUDED_)