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.

87 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1998
  5. //
  6. // File: wndctx.h
  7. //
  8. // Contents: NT Marta window context class
  9. //
  10. // History: 3-31-1999 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #include <aclpch.hxx>
  14. #pragma hdrstop
  15. #if !defined(__WNDCTX_H__)
  16. #define __WNDCTX_H__
  17. #include <windows.h>
  18. #include <window.h>
  19. #include <assert.h>
  20. //
  21. // CWindowContext. This represents a window station to the NT Marta
  22. // infrastructure
  23. //
  24. class CWindowContext
  25. {
  26. public:
  27. //
  28. // Construction
  29. //
  30. CWindowContext ();
  31. ~CWindowContext ();
  32. DWORD InitializeByName (LPCWSTR pObjectName, ACCESS_MASK AccessMask);
  33. DWORD InitializeByHandle (HANDLE Handle);
  34. //
  35. // Dispatch methods
  36. //
  37. DWORD AddRef ();
  38. DWORD Release ();
  39. DWORD GetWindowProperties (
  40. PMARTA_OBJECT_PROPERTIES pProperties
  41. );
  42. DWORD GetWindowRights (
  43. SECURITY_INFORMATION SecurityInfo,
  44. PSECURITY_DESCRIPTOR* ppSecurityDescriptor
  45. );
  46. DWORD SetWindowRights (
  47. SECURITY_INFORMATION SecurityInfo,
  48. PSECURITY_DESCRIPTOR pSecurityDescriptor
  49. );
  50. private:
  51. //
  52. // Reference count
  53. //
  54. DWORD m_cRefs;
  55. //
  56. // Window station handle
  57. //
  58. HWINSTA m_hWindowStation;
  59. //
  60. // Were we initialized by name or handle?
  61. //
  62. BOOL m_fNameInitialized;
  63. };
  64. #endif