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.

129 lines
3.9 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. srcprop.h
  5. Abstract:
  6. Data Source Property Page
  7. --*/
  8. #ifndef _SRCPROP_H_
  9. #define _SRCPROP_H_
  10. #include <sqlext.h>
  11. #include "timerng.h"
  12. #include "smonprop.h"
  13. // Dialog Controls
  14. #define IDD_SRC_PROPP_DLG 400
  15. #define IDC_SRC_REALTIME 401
  16. #define IDC_SRC_LOGFILE 402
  17. #define IDC_SRC_SQL 403 // IDH value is out of sync, should still work
  18. #define IDC_SRC_GROUP 405
  19. #define IDC_TIME_GROUP 406
  20. #define IDC_TIMERANGE 407
  21. #define IDC_TIMESELECTBTN 408
  22. #define IDC_STATIC_TOTAL 410
  23. #define IDC_STATIC_SELECTED 411
  24. #define IDC_LIST_LOGFILENAME 412
  25. #define IDC_ADDFILE 413
  26. #define IDC_REMOVEFILE 414
  27. #define IDC_DSN_COMBO 416
  28. #define IDC_LOGSET_COMBO 417
  29. #define IDC_STATIC_DSN 418
  30. #define IDC_STATIC_LOGSET 419
  31. #define REALTIME_SRC 1
  32. #define LOGFILE_SRC 2
  33. //
  34. // The maximum lenght of log set name must be greater
  35. // than or equal to that in smlogsvc.exe.
  36. //
  37. #define SLQ_MAX_LOG_SET_NAME_LEN 255
  38. typedef struct _LogItemInfo {
  39. struct _LogItemInfo* pNextInfo; // For "Deleted" list
  40. ILogFileItem* pItem;
  41. LPWSTR pszPath;
  42. } LogItemInfo, *PLogItemInfo;
  43. // Data source property page class
  44. class CSourcePropPage : public CSysmonPropPage
  45. {
  46. public:
  47. CSourcePropPage(void);
  48. virtual ~CSourcePropPage(void);
  49. virtual BOOL Init( void );
  50. protected:
  51. virtual BOOL GetProperties(void); //Read current properties
  52. virtual BOOL SetProperties(void); //Set new properties
  53. virtual BOOL InitControls(void);
  54. virtual void DeinitControls(void); // Deinitialize dialog controls
  55. virtual void DialogItemChange(WORD wId, WORD wMsg); // Handle item change
  56. virtual HRESULT EditPropertyImpl( DISPID dispID); // Set focus control
  57. private:
  58. enum eConstants {
  59. ePdhLogTypeRetiredBinary = 3
  60. };
  61. DWORD OpenLogFile(void); // Open log file and get time range
  62. void SetTimeRangeCtrlState ( BOOL bValidLogFile, BOOL bValidLogFileRange );
  63. BOOL AddItemToFileListBox ( PLogItemInfo pInfo );
  64. BOOL RemoveItemFromFileListBox ( void );
  65. void OnLogFileChange ( void );
  66. void OnSqlDataChange ( void );
  67. void InitSqlDsnList(void);
  68. void InitSqlLogSetList(void);
  69. void SetSourceControlStates(void);
  70. void LogFilesAreValid ( PLogItemInfo pNewInfo, BOOL& rbNewIsValid, BOOL& rbExistingIsValid );
  71. DWORD BuildLogFileList (
  72. HWND hwndDlg,
  73. LPWSTR szLogFileList,
  74. ULONG* pulBufLen );
  75. PCTimeRange m_pTimeRange;
  76. // Properties
  77. DataSourceTypeConstants m_eDataSourceType;
  78. BOOL m_bInitialTimeRangePending;
  79. LONGLONG m_llStart;
  80. LONGLONG m_llStop;
  81. LONGLONG m_llBegin;
  82. LONGLONG m_llEnd;
  83. HLOG m_hDataSource;
  84. DWORD m_dwMaxHorizListExtent;
  85. WCHAR m_szSqlDsnName[SQL_MAX_DSN_LENGTH + 1];
  86. WCHAR m_szSqlLogSetName[SLQ_MAX_LOG_SET_NAME_LEN + 1];
  87. PLogItemInfo m_pInfoDeleted;
  88. // Property change flags
  89. BOOL m_bLogFileChg;
  90. BOOL m_bSqlDsnChg;
  91. BOOL m_bSqlLogSetChg;
  92. BOOL m_bRangeChg;
  93. BOOL m_bDataSourceChg;
  94. };
  95. typedef CSourcePropPage *PCSourcePropPage;
  96. // {0CF32AA1-7571-11d0-93C4-00AA00A3DDEA}
  97. DEFINE_GUID(CLSID_SourcePropPage,
  98. 0xcf32aa1, 0x7571, 0x11d0, 0x93, 0xc4, 0x0, 0xaa, 0x0, 0xa3, 0xdd, 0xea);
  99. #endif //_SRCPROP_H_