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.

188 lines
6.9 KiB

  1. // emshellView.h : interface of the CEmshellView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_EMSHELLVIEW_H__4D47F015_9482_4563_8A25_58AA5FD22CB4__INCLUDED_)
  5. #define AFX_EMSHELLVIEW_H__4D47F015_9482_4563_8A25_58AA5FD22CB4__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "EmListCtrl.h"
  10. #include "emsvc.h"
  11. #include "emobjdef.h"
  12. class CEmshellDoc;
  13. class CEmshellView : public CFormView
  14. {
  15. protected: // create from serialization only
  16. CEmshellView();
  17. DECLARE_DYNCREATE(CEmshellView)
  18. public:
  19. //{{AFX_DATA(CEmshellView)
  20. enum { IDD = IDD_EMSHELL_FORM };
  21. CEmListCtrl m_mainListControl;
  22. //}}AFX_DATA
  23. // Attributes
  24. public:
  25. CEmshellDoc* GetDocument();
  26. // Operations
  27. public:
  28. // Overrides
  29. // ClassWizard generated virtual function overrides
  30. //{{AFX_VIRTUAL(CEmshellView)
  31. public:
  32. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  33. protected:
  34. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  35. virtual void OnInitialUpdate(); // called first time after construct
  36. //}}AFX_VIRTUAL
  37. // Implementation
  38. public:
  39. void SelectItemBySZNAME(TCHAR* pszName, int nId);
  40. void ShowProperties( PEmObject pEmObject );
  41. void InitializeMSInfoView();
  42. void PopulateMSInfoType();
  43. BOOL CommenceOrphanCustodyBattle( IEmDebugSession* pIEmDebugSession );
  44. void ReSynchStoppedSessions();
  45. void DoModalPropertySheet(PEmObject pEmObject);
  46. HRESULT GetClientConnectString(IN OUT LPTSTR pszConnectString, IN DWORD dwBuffSize, PEmObject pEmSessObj, int nPort);
  47. HRESULT StartCDBClient(IN LPTSTR lpszConnectString);
  48. EMShellViewState GetViewState();
  49. void SetShellState(EMShellViewState eState);
  50. void PopulateProcessType();
  51. void PopulateServiceType();
  52. void PopulateDumpType();
  53. void PopulateLogType();
  54. void PopulateCompletedSessionsType();
  55. void ListCtrlInitialize(EMShellViewState eShellViewState);
  56. void InitializeDumpView();
  57. void InitializeLogView();
  58. void InitializeProcessView();
  59. void InitializeAllView();
  60. void InitializeServiceView();
  61. void InitializeCompletedSessionsView();
  62. int GetImageOffsetFromStatus(EmSessionStatus em);
  63. PActiveSession FindActiveSession(PEmObject pEmObject);
  64. PEmObject GetSelectedEmObject();
  65. int GetSelectedItemIndex();
  66. void RefreshListCtl();
  67. void RefreshProcessViewElement(PEmObject pEmObject);
  68. void RefreshServiceViewElement(PEmObject pEmObject);
  69. void RefreshCompletedSessionViewElement(PEmObject pEmObject);
  70. void RefreshAllViewElement(PEmObject pEmObject);
  71. void RefreshLogViewElement(PEmObject pEmObject);
  72. void RefreshDumpViewElement(PEmObject pEmObject);
  73. void GenerateDump(PEmObject pEmObj, BOOL bMiniDump);
  74. void ReSynchServices();
  75. void ReSynchApplications();
  76. void UpdateListElement(PEmObject pEmObject);
  77. HRESULT DeleteDebugSession(PEmObject pEmObject);
  78. HRESULT RemoveActiveSession(PEmObject pEmObject);
  79. void StopDebugSession(PEmObject pEmObject);
  80. void CancelDebugSession(PEmObject pEmObject);
  81. void DeAllocActiveSession(PActiveSession pActiveSession);
  82. void ListCtrlClear();
  83. void ListCtrlPopulate(EMShellViewState eShellViewState);
  84. HRESULT StartAutomaticDebugSession(EmObject* pEmObject);
  85. HRESULT StartManualDebugSession(EmObject* pEmObject);
  86. void ClearSessionTable();
  87. PActiveSession AllocActiveSession(PEmObject pEmObject, IEmDebugSession* pIDebugSession);
  88. PActiveSession AddActiveSession(PEmObject pEmObject, IEmDebugSession* pIEmDebugSession, BOOL bMaster);
  89. CPtrArray* GetSessionTable();
  90. virtual ~CEmshellView();
  91. #ifdef _DEBUG
  92. virtual void AssertValid() const;
  93. virtual void Dump(CDumpContext& dc) const;
  94. #endif
  95. protected:
  96. // Generated message map functions
  97. protected:
  98. EMShellViewState m_enumShellViewState;
  99. void StoreOffSelectedEmObject();
  100. EmObject m_lastSelectedEmObj;
  101. CImageList m_ShellImageList;
  102. CPtrArray m_SessionTable;
  103. BOOL m_bLocalServer;
  104. HRESULT DisplayProcessData(PEmObject pEmObject);
  105. HRESULT DisplayServiceData(PEmObject pEmObject);
  106. HRESULT DisplayLogData(PEmObject pEmObject);
  107. HRESULT DisplayDumpData(PEmObject pEmObject);
  108. HRESULT DisplayStoppedSessionData(PEmObject pEmObject);
  109. HRESULT DisplayMSInfoData(PEmObject pEmObject);
  110. //{{AFX_MSG(CEmshellView)
  111. afx_msg void OnSize(UINT nType, int cx, int cy);
  112. afx_msg void OnDestroy();
  113. afx_msg void OnTimer(UINT nIDEvent);
  114. afx_msg void OnUpdateViewRefresh(CCmdUI* pCmdUI);
  115. afx_msg void OnViewRefresh();
  116. afx_msg void OnUpdateProcesspopupStopDebugSession(CCmdUI* pCmdUI);
  117. afx_msg void OnProcesspopupStopDebugSession();
  118. afx_msg void OnProcesspopupGenerateminidump();
  119. afx_msg void OnUpdateProcesspopupGenerateminidump(CCmdUI* pCmdUI);
  120. afx_msg void OnProcesspopupGenerateuserdump();
  121. afx_msg void OnUpdateProcesspopupGenerateuserdump(CCmdUI* pCmdUI);
  122. afx_msg void OnProcesspopupAutomaticsession();
  123. afx_msg void OnUpdateProcesspopupAutomaticsession(CCmdUI* pCmdUI);
  124. afx_msg void OnUpdateProcesspopupProperties(CCmdUI* pCmdUI);
  125. afx_msg void OnProcesspopupProperties();
  126. afx_msg void OnUpdateProcesspopupManualsession(CCmdUI* pCmdUI);
  127. afx_msg void OnProcesspopupManualsession();
  128. afx_msg void OnProcesspopupRefresh();
  129. afx_msg void OnUpdateProcesspopupRefresh(CCmdUI* pCmdUI);
  130. afx_msg void OnViewServicesandapplications();
  131. afx_msg void OnUpdateViewServicesandapplications(CCmdUI* pCmdUI);
  132. afx_msg void OnViewLogfiles();
  133. afx_msg void OnUpdateViewLogfiles(CCmdUI* pCmdUI);
  134. afx_msg void OnViewDumpfiles();
  135. afx_msg void OnUpdateViewDumpfiles(CCmdUI* pCmdUI);
  136. afx_msg void OnUpdateLogpopupOpen(CCmdUI* pCmdUI);
  137. afx_msg void OnLogpopupOpen();
  138. afx_msg void OnUpdateLogpopupProperties(CCmdUI* pCmdUI);
  139. afx_msg void OnLogpopupProperties();
  140. afx_msg void OnViewApplications();
  141. afx_msg void OnUpdateViewApplications(CCmdUI* pCmdUI);
  142. afx_msg void OnViewCompletedsessions();
  143. afx_msg void OnUpdateViewCompletedsessions(CCmdUI* pCmdUI);
  144. afx_msg void OnViewServices();
  145. afx_msg void OnUpdateViewServices(CCmdUI* pCmdUI);
  146. afx_msg void OnProcesspopupDeleteSession();
  147. afx_msg void OnUpdateProcesspopupDeleteSession(CCmdUI* pCmdUI);
  148. afx_msg void OnToolsOptions();
  149. afx_msg void OnUpdateToolsOptoins(CCmdUI* pCmdUI);
  150. afx_msg void OnProcesspopupCancelDebugSession();
  151. afx_msg void OnUpdateProcesspopupCancelDebugSession(CCmdUI* pCmdUI);
  152. afx_msg void OnLogpopupDelete();
  153. afx_msg void OnUpdateLogpopupDelete(CCmdUI* pCmdUI);
  154. afx_msg void OnActionGenerateMSInfoFile();
  155. afx_msg void OnUpdateActionGenerateMSInfoFile(CCmdUI* pCmdUI);
  156. afx_msg void OnViewMSInfoFiles();
  157. afx_msg void OnUpdateViewMSInfoFiles(CCmdUI* pCmdUI);
  158. afx_msg void OnLogpopupExport();
  159. afx_msg void OnUpdateLogpopupExport(CCmdUI* pCmdUI);
  160. afx_msg void OnHelpContents();
  161. //}}AFX_MSG
  162. DECLARE_MESSAGE_MAP()
  163. private:
  164. };
  165. #ifndef _DEBUG // debug version in emshellView.cpp
  166. inline CEmshellDoc* CEmshellView::GetDocument()
  167. { return (CEmshellDoc*)m_pDocument; }
  168. #endif
  169. /////////////////////////////////////////////////////////////////////////////
  170. //{{AFX_INSERT_LOCATION}}
  171. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  172. #endif // !defined(AFX_EMSHELLVIEW_H__4D47F015_9482_4563_8A25_58AA5FD22CB4__INCLUDED_)