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.

161 lines
4.5 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. // WMITestDoc.h : interface of the CWMITestDoc class
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10. #if !defined(AFX_WMITESTDOC_H__4419F1AA_692B_11D3_BD30_0080C8E60955__INCLUDED_)
  11. #define AFX_WMITESTDOC_H__4419F1AA_692B_11D3_BD30_0080C8E60955__INCLUDED_
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif // _MSC_VER > 1000
  15. class COpView;
  16. class CObjView;
  17. class CObjInfo;
  18. //#define SVCEX
  19. class CWMITestDoc : public CDocument
  20. {
  21. protected: // create from serialization only
  22. CWMITestDoc();
  23. DECLARE_DYNCREATE(CWMITestDoc)
  24. // Attributes
  25. public:
  26. #ifdef SVCEX
  27. IWbemServicesEx *m_pNamespace;
  28. #else
  29. IWbemServices *m_pNamespace;
  30. #endif
  31. COpView *m_pOpView;
  32. CObjView *m_pObjView;
  33. CString m_strNamespace,
  34. m_strPassword;
  35. CLIPFORMAT m_cfRelPaths,
  36. m_cfProps,
  37. m_cfOps;
  38. // Operations
  39. public:
  40. HRESULT Connect(BOOL bSilent, BOOL bFlushItems = TRUE);
  41. void Disconnect();
  42. void DoConnectDlg();
  43. void StopOps();
  44. void IncBusyOps() { m_nBusyOps++; }
  45. void DecBusyOps() { if (m_nBusyOps > 0) m_nBusyOps--; }
  46. void AutoConnect();
  47. HTREEITEM GetCurrentItem();
  48. CObjInfo *GetCurrentObj();
  49. BOOL GetSelectedObjPath(CString &strPath);
  50. BOOL GetSelectedClass(CString &strClass);
  51. static void DisplayWMIErrorBox(
  52. HRESULT hres,
  53. //IWbemCallResult *pResult = NULL,
  54. IWbemClassObject *pObj = NULL);
  55. static void DisplayWMIErrorDetails(IWbemClassObject *pObj);
  56. static BOOL EditGenericObject(DWORD dwPrompt, IWbemClassObject *pObj);
  57. void ExecuteMethod(CObjInfo *pObj, LPCTSTR szMethod);
  58. void SetInterfaceSecurity(IUnknown *pUnk);
  59. // Overrides
  60. // ClassWizard generated virtual function overrides
  61. //{{AFX_VIRTUAL(CWMITestDoc)
  62. public:
  63. virtual BOOL OnNewDocument();
  64. virtual void Serialize(CArchive& ar);
  65. virtual void OnCloseDocument();
  66. //}}AFX_VIRTUAL
  67. // Implementation
  68. public:
  69. virtual ~CWMITestDoc();
  70. #ifdef _DEBUG
  71. virtual void AssertValid() const;
  72. virtual void Dump(CDumpContext& dc) const;
  73. #endif
  74. protected:
  75. //BSTR m_pPrincipal;
  76. //COAUTHIDENTITY *m_pAuthIdentity;
  77. int m_nBusyOps;
  78. void ExportItem(HTREEITEM hitem);
  79. // Generated message map functions
  80. protected:
  81. //{{AFX_MSG(CWMITestDoc)
  82. afx_msg void OnConnect();
  83. afx_msg void OnUpdateAgainstConnection(CCmdUI* pCmdUI);
  84. afx_msg void OnQuery();
  85. afx_msg void OnNotificationQuery();
  86. afx_msg void OnStop();
  87. afx_msg void OnUpdateStop(CCmdUI* pCmdUI);
  88. afx_msg void OnRefreshAll();
  89. afx_msg void OnEnumerateInstances();
  90. afx_msg void OnEnumerateClasses();
  91. afx_msg void OnGetClass();
  92. afx_msg void OnGetInstance();
  93. afx_msg void OnDelete();
  94. afx_msg void OnUpdateDelete(CCmdUI* pCmdUI);
  95. afx_msg void OnRefreshCurrent();
  96. afx_msg void OnAssociators();
  97. afx_msg void OnUpdateAssociators(CCmdUI* pCmdUI);
  98. afx_msg void OnReferences();
  99. afx_msg void OnInstGetClass();
  100. afx_msg void OnUpdateInstGetClass(CCmdUI* pCmdUI);
  101. afx_msg void OnInstGetInst();
  102. afx_msg void OnClassInstances();
  103. afx_msg void OnClassSuperclass();
  104. afx_msg void OnClassInstancesDeep();
  105. afx_msg void OnClassSubclassesDeep();
  106. afx_msg void OnClassSubclasses();
  107. afx_msg void OnOptions();
  108. afx_msg void OnSystemProps();
  109. afx_msg void OnUpdateSystemProps(CCmdUI* pCmdUI);
  110. afx_msg void OnInheritedProps();
  111. afx_msg void OnUpdateInheritedProps(CCmdUI* pCmdUI);
  112. afx_msg void OnReconnect();
  113. afx_msg void OnUpdateReconnect(CCmdUI* pCmdUI);
  114. afx_msg void OnTranslateValues();
  115. afx_msg void OnUpdateTranslateValues(CCmdUI* pCmdUI);
  116. afx_msg void OnSave();
  117. afx_msg void OnUpdateSave(CCmdUI* pCmdUI);
  118. afx_msg void OnCreateClass();
  119. afx_msg void OnCreateInstance();
  120. afx_msg void OnClassCreateInstance();
  121. afx_msg void OnErrorDetails();
  122. afx_msg void OnUpdateErrorDetails(CCmdUI* pCmdUI);
  123. afx_msg void OnExecMethod();
  124. afx_msg void OnShowMof();
  125. afx_msg void OnUpdateShowMof(CCmdUI* pCmdUI);
  126. afx_msg void OnExportTree();
  127. afx_msg void OnExportItem();
  128. afx_msg void OnFilterBindings();
  129. afx_msg void OnStopCurrent();
  130. afx_msg void OnUpdateRefreshCurrent(CCmdUI* pCmdUI);
  131. afx_msg void OnUpdateStopCurrent(CCmdUI* pCmdUI);
  132. //}}AFX_MSG
  133. afx_msg void OnExecuteMethod(UINT uiCmd);
  134. DECLARE_MESSAGE_MAP()
  135. };
  136. /////////////////////////////////////////////////////////////////////////////
  137. //{{AFX_INSERT_LOCATION}}
  138. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  139. #endif // !defined(AFX_WMITESTDOC_H__4419F1AA_692B_11D3_BD30_0080C8E60955__INCLUDED_)