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.

120 lines
3.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. // Copyright (c) 2002 Microsoft Corporation. All rights reserved.
  3. // Copyright (c) 2002 OSR Open Systems Resources, Inc.
  4. //
  5. // Utils.h : header for miscelaneous functions
  6. //////////////////////////////////////////////////////////////////////////////
  7. BOOLEAN ParsePdb(CString &PDBFileName, CString &TMFPath, BOOL bCommandLine = FALSE);
  8. void StringToGuid(TCHAR *str, LPGUID guid);
  9. ULONG ahextoi(TCHAR *s);
  10. LONG GetGuids(IN LPTSTR GuidFile, IN OUT LPGUID *GuidArray);
  11. ULONG SetGlobalLoggerSettings(IN DWORD StartValue,
  12. IN PEVENT_TRACE_PROPERTIES LoggerInfo,
  13. IN DWORD ClockType);
  14. ULONG GetGlobalLoggerSettings(IN OUT PEVENT_TRACE_PROPERTIES LoggerInfo,
  15. OUT PULONG ClockType,
  16. OUT PDWORD pdwStart);
  17. LONG ConvertStringToNum(CString Str);
  18. BOOL ClearDirectory(LPCTSTR Directory);
  19. inline VOID GuidToString(GUID Guid, CString &GuidString)
  20. {
  21. GuidString.Format(_T("%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"),
  22. Guid.Data1,
  23. Guid.Data2,
  24. Guid.Data3,
  25. Guid.Data4[0], Guid.Data4[1],
  26. Guid.Data4[2], Guid.Data4[3],
  27. Guid.Data4[4], Guid.Data4[5],
  28. Guid.Data4[6], Guid.Data4[7]);
  29. }
  30. class CSubItemEdit : public CEdit
  31. {
  32. // Construction
  33. public:
  34. CSubItemEdit(int iItem, int iSubItem, CListCtrl *pListControl);
  35. // Attributes
  36. public:
  37. // Operations
  38. public:
  39. // Overrides
  40. // ClassWizard generated virtual function overrides
  41. //{{AFX_VIRTUAL(CSubItemEdit)
  42. public:
  43. virtual BOOL PreTranslateMessage(MSG* pMsg);
  44. //}}AFX_VIRTUAL
  45. // Implementation
  46. public:
  47. virtual ~CSubItemEdit() {};
  48. // Generated message map functions
  49. protected:
  50. //{{AFX_MSG(CSubItemEdit)
  51. afx_msg void OnKillFocus(CWnd* pNewWnd);
  52. afx_msg void OnNcDestroy();
  53. afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  54. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. private:
  58. int m_iItem;
  59. int m_iSubItem;
  60. CListCtrl *m_pListControl;
  61. BOOL m_bESC;
  62. };
  63. class CSubItemCombo : public CComboBox
  64. {
  65. // Construction
  66. public:
  67. CSubItemCombo(int iItem, int iSubItem, CListCtrl *pListControl);
  68. // Attributes
  69. public:
  70. // Operations
  71. public:
  72. // Overrides
  73. // ClassWizard generated virtual function overrides
  74. //{{AFX_VIRTUAL(CSubItemCombo)
  75. public:
  76. virtual BOOL PreTranslateMessage(MSG* pMsg);
  77. //}}AFX_VIRTUAL
  78. // Implementation
  79. public:
  80. virtual ~CSubItemCombo() {};
  81. // Generated message map functions
  82. protected:
  83. //{{AFX_MSG(CSubItemCombo)
  84. afx_msg void OnKillFocus(CWnd* pNewWnd);
  85. afx_msg void OnNcDestroy();
  86. afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  87. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  88. afx_msg void OnCloseup();
  89. //}}AFX_MSG
  90. DECLARE_MESSAGE_MAP()
  91. private:
  92. int m_iItem;
  93. int m_iSubItem;
  94. CListCtrl *m_pListControl;
  95. BOOL m_bESC;
  96. };