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.

169 lines
5.6 KiB

  1. /*++
  2. Copyright (C) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. smproppg.h
  5. Abstract:
  6. Class definitions for the property page base class.
  7. --*/
  8. #ifndef _SMPROPPG_H_
  9. #define _SMPROPPG_H_
  10. #if _MSC_VER >= 1000
  11. #pragma once
  12. #endif // _MSC_VER >= 1000
  13. #include "smlogqry.h" // For shared data
  14. #define MAXSTR 32
  15. #define INVALID_DWORD -2 // SLQ_DISK_MAX_SIZE = -1
  16. #define INVALID_DOUBLE -1.00
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CSmPropertyPage dialog
  19. #define VALIDATE_FOCUS 1
  20. #define VALIDATE_APPLY 2
  21. class CSmPropertyPage : public CPropertyPage
  22. {
  23. DECLARE_DYNCREATE(CSmPropertyPage)
  24. // Construction
  25. public:
  26. CSmPropertyPage();
  27. CSmPropertyPage (
  28. UINT nIDTemplate,
  29. LONG_PTR hConsole = NULL,
  30. LPDATAOBJECT pDataObject = NULL );
  31. virtual ~CSmPropertyPage();
  32. public:
  33. static UINT CALLBACK PropSheetPageProc( HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp );
  34. DWORD SetContextHelpFilePath ( const CString& rstrPath );
  35. const CString& GetContextHelpFilePath ( void ) { return m_strContextHelpFilePath; };
  36. void SetModifiedPage ( const BOOL bModified = TRUE );
  37. DWORD AllocInitCounterPath(
  38. const LPWSTR szCounterPath,
  39. PPDH_COUNTER_PATH_ELEMENTS* ppCounter );
  40. // Dialog Data
  41. //{{AFX_DATA(CSmPropertyPage)
  42. // DO NOT EDIT what you see in these blocks of generated code !
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generate virtual function overrides
  46. //{{AFX_VIRTUAL(CSmPropertyPage)
  47. public:
  48. protected:
  49. virtual BOOL OnInitDialog();
  50. virtual BOOL OnSetActive();
  51. virtual BOOL OnApply();
  52. //}}AFX_VIRTUAL
  53. public:
  54. LPFNPSPCALLBACK m_pfnOriginalCallback;
  55. // Implementation
  56. protected:
  57. // Generated message map functions
  58. //{{AFX_MSG(CSmPropertyPage)
  59. virtual BOOL OnHelpInfo( HELPINFO* );
  60. virtual void OnContextMenu( CWnd*, CPoint );
  61. virtual LRESULT OnQuerySiblings (WPARAM wParam, LPARAM lParam) ;
  62. //}}AFX_MSG
  63. DECLARE_MESSAGE_MAP()
  64. // Generated OLE dispatch map functions
  65. //{{AFX_DISPATCH(CCountersProperty)
  66. // NOTE - the ClassWizard will add and remove member functions here.
  67. //}}AFX_DISPATCH
  68. // DECLARE_DISPATCH_MAP()
  69. // DECLARE_INTERFACE_MAP()
  70. protected:
  71. enum eStartType {
  72. eStartManually,
  73. eStartImmediately,
  74. eStartSched
  75. };
  76. void SetRunAs( CSmLogQuery* pQuery );
  77. BOOL Initialize(CSmLogQuery* pQuery);
  78. eStartType DetermineCurrentStartType ( void );
  79. virtual INT GetFirstHelpCtrlId ( void ) { ASSERT ( FALSE ); return 0; }; // Subclass must override.
  80. BOOL IsValidData ( CSmLogQuery* pQuery, DWORD fReason );
  81. virtual BOOL IsValidLocalData() { return TRUE; }
  82. BOOL ApplyRunAs ( CSmLogQuery* pQuery );
  83. BOOL IsActive( void ) { return m_bIsActive; };
  84. void SetIsActive( BOOL bIsActive ) { m_bIsActive = bIsActive; };
  85. BOOL UpdateService( CSmLogQuery* pQuery, BOOL bSyncSerial = FALSE );
  86. void SetHelpIds ( DWORD* pdwHelpIds ) { m_pdwHelpIds = pdwHelpIds; };
  87. BOOL IsModifiedPage( void ) { return m_bIsModifiedPage; };
  88. void ValidateTextEdit(CDataExchange * pDX,
  89. int nIDC,
  90. int nMaxChars,
  91. DWORD * value,
  92. DWORD minValue,
  93. DWORD maxValue);
  94. BOOL ValidateDWordInterval(int nIDC,
  95. LPCWSTR strLogName,
  96. long lValue,
  97. DWORD minValue,
  98. DWORD maxValue);
  99. void OnDeltaposSpin(NMHDR * pNMHDR,
  100. LRESULT * pResult,
  101. DWORD * pValue,
  102. DWORD dMinValue,
  103. DWORD dMaxValue);
  104. BOOL SampleTimeIsLessThanSessionTime( CSmLogQuery* pQuery );
  105. BOOL SampleIntervalIsInRange( SLQ_TIME_INFO&, const CString& );
  106. BOOL IsWritableQuery( CSmLogQuery* pQuery );
  107. DWORD SetFocusAnyPage ( INT iControlId );
  108. BOOL ConnectRemoteWbemFail(CSmLogQuery* pQuery, BOOL bNotTouchRunAs);
  109. SLQ_PROP_PAGE_SHARED m_SharedData;
  110. HINSTANCE m_hModule;
  111. LPDATAOBJECT m_pDataObject;
  112. CString m_strUserDisplay; // For RunAs
  113. CString m_strUserSaved;
  114. CSmLogQuery* m_pQuery;
  115. BOOL m_bCanAccessRemoteWbem;
  116. BOOL m_bPwdButtonEnabled;
  117. private:
  118. LONG_PTR m_hConsole;
  119. UINT m_uiIdTemplate;
  120. BOOL m_bIsActive;
  121. CString m_strContextHelpFilePath;
  122. DWORD* m_pdwHelpIds;
  123. BOOL m_bIsModifiedPage;
  124. };
  125. //{{AFX_INSERT_LOCATION}}
  126. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  127. #endif // _SMPROPPG_H_