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.

85 lines
2.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: mmctask.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // MMCTask.h : Declaration of the CMMCTask
  11. #ifndef __MMCTASK_H_
  12. #define __MMCTASK_H_
  13. #include "resource.h" // main symbols
  14. #include "mmc.h"
  15. #include <ndmgr.h>
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CMMCTask
  18. class ATL_NO_VTABLE CMMCTask :
  19. public CComObjectRootEx<CComSingleThreadModel>,
  20. public CComCoClass<CMMCTask, &CLSID_MMCTask>,
  21. public IDispatchImpl<IMMCTask, &IID_IMMCTask, &LIBID_CICLib>
  22. {
  23. public:
  24. CMMCTask();
  25. ~CMMCTask();
  26. HRESULT SetScript (LPOLESTR szScript);
  27. HRESULT SetActionURL (LPOLESTR szActionURL);
  28. HRESULT SetCommandID (LONG_PTR nID);
  29. HRESULT SetActionType (long nType);
  30. HRESULT SetHelp (LPOLESTR szHelp);
  31. HRESULT SetText (LPOLESTR szText);
  32. HRESULT SetClsid (LPOLESTR szClsid);
  33. HRESULT SetDisplayObject (MMC_TASK_DISPLAY_OBJECT* pdo);
  34. DECLARE_MMC_OBJECT_REGISTRATION(
  35. g_szCicDll,
  36. CLSID_MMCTask,
  37. _T("MMCTask class"),
  38. _T("MMCTask.MMCTask.1"),
  39. _T("MMCTask.MMCTask"))
  40. DECLARE_NOT_AGGREGATABLE(CMMCTask)
  41. BEGIN_COM_MAP(CMMCTask)
  42. COM_INTERFACE_ENTRY(IMMCTask)
  43. COM_INTERFACE_ENTRY(IDispatch)
  44. END_COM_MAP()
  45. // IMMCTask
  46. public:
  47. STDMETHOD(get_Clsid)(/*[out, retval]*/ BSTR *pVal);
  48. STDMETHOD(get_Script)(/*[out, retval]*/ BSTR *pVal);
  49. STDMETHOD(get_ActionURL)(/*[out, retval]*/ BSTR *pVal);
  50. STDMETHOD(get_CommandID)(/*[out, retval]*/ LONG_PTR *pVal);
  51. STDMETHOD(get_ActionType)(/*[out, retval]*/ long *pVal);
  52. STDMETHOD(get_Help)(/*[out, retval]*/ BSTR *pVal);
  53. STDMETHOD(get_Text)(/*[out, retval]*/ BSTR *pVal);
  54. STDMETHOD(get_ScriptLanguage)(/*[out, retval]*/ BSTR *pVal);
  55. STDMETHOD(get_DisplayObject)(/*[out, retval]*/ IDispatch** pDispatch);
  56. private:
  57. void FreeActions ();
  58. private:
  59. BSTR m_bstrLanguage;
  60. BSTR m_bstrScript;
  61. BSTR m_bstrActionURL;
  62. BSTR m_bstrHelp;
  63. BSTR m_bstrText;
  64. BSTR m_bstrClsid;
  65. long m_type;
  66. LONG_PTR m_ID;
  67. IDispatchPtr m_spDisplayObject;
  68. // Ensure that default copy constructor & assignment are not used.
  69. CMMCTask(const CMMCTask& rhs);
  70. CMMCTask& operator=(const CMMCTask& rhs);
  71. };
  72. #endif //__MMCTASK_H_