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.

95 lines
2.8 KiB

  1. // svcprop1.h : header file
  2. //
  3. /////////////////////////////////////////////////////////////////////
  4. // This structure is used to initialize the thread associated with
  5. // the CServicePageGeneral.
  6. class CThreadProcInit
  7. {
  8. public:
  9. CServicePageGeneral * m_pThis; // 'this' pointer
  10. volatile HWND m_hwnd; // Handle to send the notification message
  11. volatile BOOL m_fAutoDestroy; // TRUE => The thread should free this object and terminate itself
  12. volatile SC_HANDLE m_hScManager; // Handle to service control manager database
  13. CString m_strServiceName;
  14. CCriticalSection m_CriticalSection;
  15. public:
  16. CThreadProcInit(CServicePageGeneral * pThis)
  17. {
  18. Assert(pThis != NULL);
  19. m_pThis = pThis;
  20. m_hwnd = NULL;
  21. m_fAutoDestroy = FALSE;
  22. m_hScManager = NULL;
  23. }
  24. }; // CThreadProcInit
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CServicePageGeneral dialog
  27. class CServicePageGeneral : public CPropertyPage
  28. {
  29. DECLARE_DYNCREATE(CServicePageGeneral)
  30. // Construction
  31. public:
  32. CServicePageGeneral();
  33. ~CServicePageGeneral();
  34. // Dialog Data
  35. //{{AFX_DATA(CServicePageGeneral)
  36. enum { IDD = IDD_PROPPAGE_SERVICE_GENERAL };
  37. //}}AFX_DATA
  38. // Overrides
  39. // ClassWizard generate virtual function overrides
  40. //{{AFX_VIRTUAL(CServicePageGeneral)
  41. public:
  42. virtual BOOL OnSetActive();
  43. virtual BOOL OnKillActive();
  44. virtual BOOL OnApply();
  45. protected:
  46. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  47. //}}AFX_VIRTUAL
  48. // Implementation
  49. protected:
  50. // Generated message map functions
  51. //{{AFX_MSG(CServicePageGeneral)
  52. #ifdef EDIT_DISPLAY_NAME_373025
  53. afx_msg void OnChangeEditDisplayName();
  54. afx_msg void OnChangeEditDescription();
  55. #endif // EDIT_DISPLAY_NAME_373025
  56. virtual BOOL OnInitDialog();
  57. afx_msg void OnDestroy();
  58. afx_msg void OnSelchangeComboStartupType();
  59. afx_msg void OnButtonPauseService();
  60. afx_msg void OnButtonStartService();
  61. afx_msg void OnButtonStopService();
  62. afx_msg void OnButtonResumeService();
  63. afx_msg BOOL OnHelp(WPARAM wParam, LPARAM lParam);
  64. afx_msg BOOL OnContextHelp(WPARAM wParam, LPARAM lParam);
  65. // CODEWORK remove this method and the WM_ definition
  66. // afx_msg LRESULT OnCompareIDataObject(WPARAM wParam, LPARAM lParam);
  67. afx_msg LRESULT OnUpdateServiceStatus(WPARAM wParam, LPARAM lParam);
  68. //}}AFX_MSG
  69. DECLARE_MESSAGE_MAP()
  70. static DWORD ThreadProcPeriodicServiceStatusUpdate(CThreadProcInit * paThreadProcInit);
  71. public:
  72. // User defined variables
  73. CServicePropertyData * m_pData;
  74. DWORD m_dwCurrentStatePrev;
  75. HANDLE m_hThread;
  76. CThreadProcInit * m_pThreadProcInit;
  77. // User defined functions
  78. void SetDlgItemFocus(INT nIdDlgItem);
  79. void EnableDlgItem(INT nIdDlgItem, BOOL fEnable);
  80. void RefreshServiceStatusButtons();
  81. }; // CServicePageGeneral