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.

136 lines
4.1 KiB

  1. // WiaLogCFGDlg.h : header file
  2. //
  3. #if !defined(AFX_WIALOGCFGDLG_H__361D7213_DFA2_4525_81A7_5F9B180FEFB7__INCLUDED_)
  4. #define AFX_WIALOGCFGDLG_H__361D7213_DFA2_4525_81A7_5F9B180FEFB7__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. // Type of logging
  9. #define WIALOG_TRACE 0x00000001
  10. #define WIALOG_WARNING 0x00000002
  11. #define WIALOG_ERROR 0x00000004
  12. // level of detail for TRACE logging
  13. #define WIALOG_LEVEL1 1 // Entry and Exit point of each function/method
  14. #define WIALOG_LEVEL2 2 // LEVEL 1, + traces within the function/method
  15. #define WIALOG_LEVEL3 3 // LEVEL 1, LEVEL 2, and any extra debugging information
  16. #define WIALOG_LEVEL4 4 // USER DEFINED data + all LEVELS of tracing
  17. #define WIALOG_NO_RESOURCE_ID 0
  18. #define WIALOG_NO_LEVEL 0
  19. // format details for logging
  20. #define WIALOG_ADD_TIME 0x00010000
  21. #define WIALOG_ADD_MODULE 0x00020000
  22. #define WIALOG_ADD_THREAD 0x00040000
  23. #define WIALOG_ADD_THREADTIME 0x00080000
  24. #define WIALOG_LOG_TOUI 0x00100000
  25. #define WIALOG_MESSAGE_TYPE_MASK 0x0000ffff
  26. #define WIALOG_MESSAGE_FLAGS_MASK 0xffff0000
  27. #define WIALOG_CHECK_TRUNCATE_ON_BOOT 0x00000001
  28. #define WIALOG_DEBUGGER 0x00000008
  29. #define WIALOG_UI 0x00000016
  30. #define REG_READ 0
  31. #define REG_WRITE 1
  32. #define REG_ADD_KEY 2
  33. #define REG_DELETE_KEY 3
  34. #define SETTINGS_RESET_DIALOG -1
  35. #define SETTINGS_TO_DIALOG 0
  36. #define SETTINGS_FROM_DIALOG 1
  37. typedef struct _LOG_INFO {
  38. DWORD dwDetail; // Logging Detail
  39. DWORD dwLevel; // Logging Level
  40. DWORD dwMode; // Logging Mode
  41. DWORD dwTruncateOnBoot; // Truncate on Boot
  42. DWORD dwClearLogOnBoot; // Clear Log on Boot
  43. DWORD dwMaxSize; // Max Log size
  44. DWORD dwLogToDebugger; // Log to Debugger
  45. TCHAR szKeyName[64]; // Module Name / Key Name
  46. } LOG_INFO;
  47. #include "registry.h"
  48. #include "LogViewer.h"
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CWiaLogCFGDlg dialog
  51. class CWiaLogCFGDlg : public CDialog
  52. {
  53. // Construction
  54. public:
  55. BOOL m_bColorCodeLogViewerText;
  56. void CheckGlobalServiceSettings();
  57. void ShowProgress(BOOL bShow);
  58. CProgCtrl m_ProgCtrl;
  59. LONG m_CurrentSelection;
  60. void InitializeDialogSettings(ULONG ulFlags = SETTINGS_TO_DIALOG);
  61. HINSTANCE m_hInstance;
  62. LOG_INFO m_LogInfo;
  63. void RegistryOperation(ULONG ulFlags);
  64. CWiaLogCFGDlg(CWnd* pParent = NULL); // standard constructor
  65. // Dialog Data
  66. //{{AFX_DATA(CWiaLogCFGDlg)
  67. enum { IDD = IDD_WIALOGCFG_DIALOG };
  68. CButton m_ColorCodeLogViewerTextCheckBox;
  69. CButton m_LogToDebuggerCheckBox;
  70. CButton m_ClearLogOnBootCheckBox;
  71. CProgressCtrl m_ProgressCtrl;
  72. CButton m_AddTimeCheckBox;
  73. CButton m_AddThreadIDCheckBox;
  74. CButton m_AddModuleCheckBox;
  75. CButton m_TruncateOnBootCheckBox;
  76. CComboBox m_ModuleComboBox;
  77. CButton m_WarningCheckBox;
  78. CButton m_ErrorCheckBox;
  79. CButton m_TraceCheckBox;
  80. CButton m_FilterOff;
  81. CButton m_Filter1;
  82. CButton m_Filter2;
  83. CButton m_Filter3;
  84. CButton m_FilterCustom;
  85. DWORD m_dwCustomLevel;
  86. //}}AFX_DATA
  87. // ClassWizard generated virtual function overrides
  88. //{{AFX_VIRTUAL(CWiaLogCFGDlg)
  89. protected:
  90. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  91. //}}AFX_VIRTUAL
  92. // Implementation
  93. protected:
  94. HICON m_hIcon;
  95. // Generated message map functions
  96. //{{AFX_MSG(CWiaLogCFGDlg)
  97. virtual BOOL OnInitDialog();
  98. afx_msg void OnPaint();
  99. afx_msg HCURSOR OnQueryDragIcon();
  100. afx_msg void OnAddModuleButton();
  101. afx_msg void OnDeleteModuleButton();
  102. virtual void OnOK();
  103. afx_msg void OnWriteSettingsButton();
  104. afx_msg void OnSelchangeSelectModuleCombobox();
  105. afx_msg void OnClearlogButton();
  106. afx_msg void OnViewLogButton();
  107. afx_msg void OnSetfocusSelectModuleCombobox();
  108. afx_msg void OnDropdownSelectModuleCombobox();
  109. //}}AFX_MSG
  110. DECLARE_MESSAGE_MAP()
  111. };
  112. //{{AFX_INSERT_LOCATION}}
  113. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  114. #endif // !defined(AFX_WIALOGCFGDLG_H__361D7213_DFA2_4525_81A7_5F9B180FEFB7__INCLUDED_)