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.

88 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1998
  5. //
  6. // File: lmsctx.h
  7. //
  8. // Contents: NT Marta LanMan share context class
  9. //
  10. // History: 4-1-1999 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #if !defined(__LMSCTX_H__)
  14. #define __LMSCTX_H__
  15. #include <windows.h>
  16. #include <lmsh.h>
  17. #include <assert.h>
  18. //
  19. // CLMShareContext. This represents a LanMan share object to the NT Marta
  20. // infrastructure
  21. //
  22. class CLMShareContext
  23. {
  24. public:
  25. //
  26. // Construction
  27. //
  28. CLMShareContext ();
  29. ~CLMShareContext ();
  30. DWORD InitializeByName (LPCWSTR pObjectName, ACCESS_MASK AccessMask);
  31. //
  32. // Dispatch methods
  33. //
  34. DWORD AddRef ();
  35. DWORD Release ();
  36. DWORD GetLMShareProperties (
  37. PMARTA_OBJECT_PROPERTIES pProperties
  38. );
  39. DWORD GetLMShareRights (
  40. SECURITY_INFORMATION SecurityInfo,
  41. PSECURITY_DESCRIPTOR* ppSecurityDescriptor
  42. );
  43. DWORD SetLMShareRights (
  44. SECURITY_INFORMATION SecurityInfo,
  45. PSECURITY_DESCRIPTOR pSecurityDescriptor
  46. );
  47. private:
  48. //
  49. // Reference count
  50. //
  51. DWORD m_cRefs;
  52. //
  53. // Parsed machine and share
  54. //
  55. LPWSTR m_pwszMachine;
  56. LPWSTR m_pwszShare;
  57. };
  58. //
  59. // Private functions
  60. //
  61. DWORD
  62. LMShareContextParseLMShareName (
  63. LPCWSTR pwszName,
  64. LPWSTR* ppMachine,
  65. LPWSTR* ppLMShare
  66. );
  67. #endif
  68.