Source code of Windows XP (NT5)
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.

46 lines
1004 B

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1999.
  5. //
  6. // File: imperson.hxx
  7. //
  8. // Contents: Class to make current thread impersonate Anonymous.
  9. //
  10. // Classes: CImpersonateAnon
  11. //
  12. // History: 09-03-1999 davidmun Created
  13. //
  14. //---------------------------------------------------------------------------
  15. #ifndef __IMPERSONATE_ANON_HXX_
  16. #define __IMPERSONATE_ANON_HXX_
  17. //+--------------------------------------------------------------------------
  18. //
  19. // Class: CImpersonateAnon
  20. //
  21. // Purpose: Impersonate anonymous in ctor, stop in dtor.
  22. //
  23. // History: 06-22-2000 DavidMun Created
  24. //
  25. //---------------------------------------------------------------------------
  26. class CImpersonateAnon
  27. {
  28. public:
  29. CImpersonateAnon();
  30. ~CImpersonateAnon();
  31. private:
  32. BOOL m_fImpersonatingAnonymous;
  33. HANDLE m_hCurrentToken;
  34. };
  35. #endif // __IMPERSONATE_ANON_HXX_