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.

84 lines
4.0 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: ThemeManagerAPIRequest.h
  3. //
  4. // Copyright (c) 2000, Microsoft Corporation
  5. //
  6. // This file contains a class that implements the work for the theme server.
  7. //
  8. // History: 2000-10-10 vtan created
  9. // 2000-11-29 vtan moved to separate file
  10. // --------------------------------------------------------------------------
  11. #ifndef _ThemeManagerAPIRequest_
  12. #define _ThemeManagerAPIRequest_
  13. #include "APIRequest.h"
  14. #include "DynamicArray.h"
  15. #include "ThemeManagerSessionData.h"
  16. // --------------------------------------------------------------------------
  17. // CThemeManagerAPIRequest
  18. //
  19. // Purpose: This is an intermediate class that contains a common method
  20. // that can be used by sub-classes.
  21. //
  22. // History: 2000-10-10 vtan created
  23. // 2000-11-29 vtan moved to separate file
  24. // --------------------------------------------------------------------------
  25. class CThemeManagerAPIRequest : public CAPIRequest
  26. {
  27. private:
  28. CThemeManagerAPIRequest (void);
  29. public:
  30. CThemeManagerAPIRequest (CAPIDispatcher* pAPIDispatcher);
  31. CThemeManagerAPIRequest (CAPIDispatcher* pAPIDispatcher, const CPortMessage& portMessage);
  32. virtual ~CThemeManagerAPIRequest (void);
  33. virtual NTSTATUS Execute (void);
  34. static NTSTATUS SessionDestroy (DWORD dwSessionID);
  35. static NTSTATUS InitializeServerChangeNumber (void);
  36. static NTSTATUS StaticInitialize (void);
  37. static NTSTATUS StaticTerminate (void);
  38. static NTSTATUS ArrayInitialize (void);
  39. static NTSTATUS ArrayTerminate (void);
  40. private:
  41. NTSTATUS ImpersonateClientIfRequired (void);
  42. NTSTATUS ClientHasTcbPrivilege (void);
  43. static int FindIndexSessionData (DWORD dwSessionID);
  44. NTSTATUS GetClientSessionData (void);
  45. NTSTATUS Execute_ThemeHooksOn (void);
  46. NTSTATUS Execute_ThemeHooksOff (void);
  47. NTSTATUS Execute_GetStatusFlags (void);
  48. NTSTATUS Execute_GetCurrentChangeNumber (void);
  49. NTSTATUS Execute_GetNewChangeNumber (void);
  50. NTSTATUS Execute_SetGlobalTheme (void);
  51. NTSTATUS Execute_MarkSection (void);
  52. NTSTATUS Execute_GetGlobalTheme (void);
  53. NTSTATUS Execute_CheckThemeSignature (void);
  54. NTSTATUS Execute_LoadTheme (void);
  55. // These are internal and typically require SE_TCB_PRIVILEGE to execute.
  56. NTSTATUS Execute_UserLogon (void);
  57. NTSTATUS Execute_UserLogoff (void);
  58. NTSTATUS Execute_SessionCreate (void);
  59. NTSTATUS Execute_SessionDestroy (void);
  60. NTSTATUS Execute_Ping (void);
  61. private:
  62. HANDLE _hToken;
  63. CThemeManagerSessionData* _pSessionData;
  64. static CDynamicCountedObjectArray* s_pSessionData;
  65. static CCriticalSection* s_pLock;
  66. static DWORD s_dwServerChangeNumber;
  67. static const TCHAR s_szServerChangeNumberValue[];
  68. };
  69. #endif /* _ThemeManagerAPIRequest_ */