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.

82 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. svcobj.h
  5. Abstract:
  6. Service object implementation.
  7. Author:
  8. Don Ryan (donryan) 04-Jan-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _SVCOBJ_H_
  14. #define _SVCOBJ_H_
  15. class CService : public CCmdTarget
  16. {
  17. DECLARE_DYNCREATE(CService)
  18. private:
  19. CCmdTarget* m_pParent;
  20. public:
  21. CString m_strName;
  22. CString m_strDisplayName;
  23. BOOL m_bIsPerServer;
  24. BOOL m_bIsReadOnly;
  25. long m_lPerServerLimit;
  26. public:
  27. CService(
  28. CCmdTarget* pParent = NULL,
  29. LPCTSTR pName = NULL,
  30. LPCTSTR pDisplayName = NULL,
  31. BOOL bIsPerServer = FALSE,
  32. BOOL bIsReadOnly = FALSE,
  33. long lPerServerLimit = 0L
  34. );
  35. virtual ~CService();
  36. #ifdef CONFIG_THROUGH_REGISTRY
  37. HKEY GetRegKey();
  38. #endif
  39. //{{AFX_VIRTUAL(CService)
  40. public:
  41. virtual void OnFinalRelease();
  42. //}}AFX_VIRTUAL
  43. //{{AFX_DISPATCH(CService)
  44. afx_msg LPDISPATCH GetApplication();
  45. afx_msg BSTR GetName();
  46. afx_msg LPDISPATCH GetParent();
  47. afx_msg long GetPerServerLimit();
  48. afx_msg BOOL IsPerServer();
  49. afx_msg BOOL IsReadOnly();
  50. afx_msg BSTR GetDisplayName();
  51. //}}AFX_DISPATCH
  52. DECLARE_DISPATCH_MAP()
  53. protected:
  54. //{{AFX_MSG(CService)
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. };
  58. #define CalcServiceBitmap(svc) ((svc)->IsPerServer() ? BMPI_PRODUCT_PER_SERVER : BMPI_PRODUCT_PER_SEAT)
  59. #endif // _SVCOBJ_H_