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.

123 lines
3.7 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. typedef struct _LogItemInfo {
  34. struct _LogItemInfo* pNextInfo; // For "Deleted" list
  35. ILogFileItem* pItem;
  36. LPTSTR pszPath;
  37. } LogItemInfo, *PLogItemInfo;
  38. // Data source property page class
  39. class CSourcePropPage : public CSysmonPropPage
  40. {
  41. public:
  42. CSourcePropPage(void);
  43. virtual ~CSourcePropPage(void);
  44. virtual BOOL Init( void );
  45. protected:
  46. virtual BOOL GetProperties(void); //Read current properties
  47. virtual BOOL SetProperties(void); //Set new properties
  48. virtual BOOL InitControls(void);
  49. virtual void DeinitControls(void); // Deinitialize dialog controls
  50. virtual void DialogItemChange(WORD wId, WORD wMsg); // Handle item change
  51. virtual HRESULT EditPropertyImpl( DISPID dispID); // Set focus control
  52. private:
  53. enum eConstants {
  54. ePdhLogTypeRetiredBinary = 3
  55. };
  56. DWORD OpenLogFile(void); // Open log file and get time range
  57. void SetTimeRangeCtrlState ( BOOL bValidLogFile, BOOL bValidLogFileRange );
  58. BOOL AddItemToFileListBox ( PLogItemInfo pInfo );
  59. BOOL RemoveItemFromFileListBox ( void );
  60. void OnLogFileChange ( void );
  61. void OnSqlDataChange ( void );
  62. void InitSqlDsnList(void);
  63. void InitSqlLogSetList(void);
  64. void SetSourceControlStates(void);
  65. void LogFilesAreValid ( PLogItemInfo pNewInfo, BOOL& rbNewIsValid, BOOL& rbExistingIsValid );
  66. DWORD BuildLogFileList (
  67. HWND hwndDlg,
  68. LPWSTR szLogFileList,
  69. ULONG* pulBufLen );
  70. PCTimeRange m_pTimeRange;
  71. // Properties
  72. DataSourceTypeConstants m_eDataSourceType;
  73. BOOL m_bInitialTimeRangePending;
  74. LONGLONG m_llStart;
  75. LONGLONG m_llStop;
  76. LONGLONG m_llBegin;
  77. LONGLONG m_llEnd;
  78. HLOG m_hDataSource;
  79. DWORD m_dwMaxHorizListExtent;
  80. TCHAR m_szSqlDsnName[SQL_MAX_DSN_LENGTH + 1];
  81. TCHAR m_szSqlLogSetName[MAX_PATH]; // Todo: MAX_PATH correct limit?
  82. PLogItemInfo m_pInfoDeleted;
  83. // Property change flags
  84. BOOL m_bLogFileChg;
  85. BOOL m_bSqlDsnChg;
  86. BOOL m_bSqlLogSetChg;
  87. BOOL m_bRangeChg;
  88. BOOL m_bDataSourceChg;
  89. };
  90. typedef CSourcePropPage *PCSourcePropPage;
  91. // {0CF32AA1-7571-11d0-93C4-00AA00A3DDEA}
  92. DEFINE_GUID(CLSID_SourcePropPage,
  93. 0xcf32aa1, 0x7571, 0x11d0, 0x93, 0xc4, 0x0, 0xaa, 0x0, 0xa3, 0xdd, 0xea);
  94. #endif //_SRCPROP_H_