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.

93 lines
3.0 KiB

  1. // wiadbgcfgDlg.h : header file
  2. //
  3. #if !defined(AFX_WIADBGCFGDLG_H__7811AC6A_1268_4534_A8F7_330497C591AA__INCLUDED_)
  4. #define AFX_WIADBGCFGDLG_H__7811AC6A_1268_4534_A8F7_330497C591AA__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. // flag data base entry struct definition
  9. typedef struct _PREDEFINED_FLAGS {
  10. TCHAR szModule[MAX_PATH]; // module that owns the user defined flag
  11. TCHAR szName[MAX_PATH]; // name of the flag...to display in list box
  12. DWORD dwFlagValue; // actual flag value
  13. }PREDEFINED_FLAGS,*PPREDEFINED_FLAGS;
  14. #define VALID_ENTRY 0x0000000
  15. #define MISSING_QUOTE 0x0000002
  16. #define MISSING_FIELD 0x0000004
  17. #define INVALID_FLAG 0x1000000
  18. #define INVALID_NAME 0x2000000
  19. #define INVALID_DESCRIPTION 0x4000000
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CWiadbgcfgDlg dialog
  22. class CWiadbgcfgDlg : public CDialog
  23. {
  24. // Construction
  25. public:
  26. void UpdateListBoxSelectionFromEditBox();
  27. // data base helpers
  28. DWORD m_dwNumEntrysInDataBase;
  29. PPREDEFINED_FLAGS m_pFlagDataBase;
  30. BOOL BuildFlagDataBaseFromFile();
  31. VOID CreateDefaultDataFile();
  32. VOID FreeDataBaseMemory();
  33. // entry parsing helpers
  34. BOOL GetDebugFlagFromDataBase(TCHAR *szModuleName, TCHAR *szFlagName, LONG *pFlagValue);
  35. VOID ParseEntry(TCHAR *pszString, PPREDEFINED_FLAGS pFlagInfo);
  36. DWORD ValidateEntry(TCHAR *szEntry);
  37. // user interface helpers
  38. BOOL AddModulesToComboBox();
  39. VOID AddFlagsToListBox(TCHAR *szModuleName);
  40. BOOL ConstructDebugRegKey(TCHAR *pszDebugRegKey, DWORD dwSize);
  41. BOOL GetSelectedModuleName(TCHAR *szModuleName, DWORD dwSize);
  42. VOID UpdateCurrentValueFromRegistry();
  43. VOID UpdateCurrentValueToRegistry();
  44. VOID UpdateEditBox();
  45. CWiadbgcfgDlg(CWnd* pParent = NULL); // standard constructor
  46. // Dialog Data
  47. //{{AFX_DATA(CWiadbgcfgDlg)
  48. enum { IDD = IDD_WIADBGCFG_DIALOG };
  49. CListBox m_DefinedDebugFlagsListBox;
  50. CComboBox m_ModuleSelectionComboBox;
  51. CString m_szDebugFlags;
  52. LONG m_lDebugFlags;
  53. //}}AFX_DATA
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(CWiadbgcfgDlg)
  56. protected:
  57. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  58. //}}AFX_VIRTUAL
  59. // Implementation
  60. protected:
  61. HICON m_hIcon;
  62. // Generated message map functions
  63. //{{AFX_MSG(CWiadbgcfgDlg)
  64. virtual BOOL OnInitDialog();
  65. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  66. afx_msg void OnPaint();
  67. afx_msg HCURSOR OnQueryDragIcon();
  68. afx_msg void OnSelchangeModulesCombobox();
  69. afx_msg void OnClose();
  70. afx_msg void OnChangeDebugFlagsEditbox();
  71. afx_msg void OnSelchangeFlagsList();
  72. //}}AFX_MSG
  73. DECLARE_MESSAGE_MAP()
  74. };
  75. //{{AFX_INSERT_LOCATION}}
  76. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  77. #endif // !defined(AFX_WIADBGCFGDLG_H__7811AC6A_1268_4534_A8F7_330497C591AA__INCLUDED_)