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.

77 lines
2.3 KiB

  1. // ProfMMgr.h: Definition of the CProfMMgr class
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_PROFMMGR_H__A20E4BA9_0CF9_4BE9_9530_B41E844C56C2__INCLUDED_)
  5. #define AFX_PROFMMGR_H__A20E4BA9_0CF9_4BE9_9530_B41E844C56C2__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "resource.h" // main symbols
  10. #include "TNode.hpp"
  11. #include "UString.hpp"
  12. class TFileNode : public TNode
  13. {
  14. WCHAR fileName[MAX_PATH];
  15. public:
  16. TFileNode(WCHAR const * name) { safecopy(fileName,name); }
  17. WCHAR const * GetName() const { return fileName; }
  18. };
  19. class TFileList : public TNodeList
  20. {
  21. public:
  22. ~TFileList() { DeleteAllListItems(TFileNode); }
  23. };
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CProfMMgr
  26. class CProfMMgr :
  27. public IDispatchImpl<IMcsDomPlugIn, &IID_IMcsDomPlugIn, &LIBID_MCSPIPFLLib>,
  28. public ISupportErrorInfoImpl<&IID_IMcsDomPlugIn>,
  29. public CComObjectRoot,
  30. public CComCoClass<CProfMMgr,&CLSID_ProfMMgr>,
  31. public ISecPlugIn
  32. {
  33. public:
  34. CProfMMgr() {}
  35. BEGIN_COM_MAP(CProfMMgr)
  36. COM_INTERFACE_ENTRY(IDispatch)
  37. COM_INTERFACE_ENTRY(IMcsDomPlugIn)
  38. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  39. COM_INTERFACE_ENTRY(ISecPlugIn)
  40. END_COM_MAP()
  41. //DECLARE_NOT_AGGREGATABLE(CProfMMgr)
  42. // Remove the comment from the line above if you don't want your object to
  43. // support aggregation.
  44. DECLARE_REGISTRY_RESOURCEID(IDR_ProfMMgr)
  45. // IMcsDomPlugIn
  46. public:
  47. STDMETHOD(GetRequiredFiles)(/* [out] */SAFEARRAY ** pArray);
  48. STDMETHOD(GetRegisterableFiles)(/* [out] */SAFEARRAY ** pArray);
  49. STDMETHOD(GetDescription)(/* [out] */ BSTR * description);
  50. STDMETHOD(PreMigrationTask)(/* [in] */IUnknown * pVarSet);
  51. STDMETHOD(PostMigrationTask)(/* [in] */IUnknown * pVarSet);
  52. STDMETHOD(GetName)(/* [out] */BSTR * name);
  53. STDMETHOD(GetResultString)(/* [in] */IUnknown * pVarSet,/* [out] */ BSTR * text);
  54. STDMETHOD(StoreResults)(/* [in] */IUnknown * pVarSet);
  55. STDMETHOD(ConfigureSettings)(/*[in]*/IUnknown * pVarSet);
  56. // ISecPlugIn
  57. public:
  58. STDMETHOD(Verify)(/*[in,out]*/ULONG * data,/*[in]*/ULONG cbData);
  59. protected:
  60. void BuildFileLists(TFileList * pRequired,TFileList * pRegisterable);
  61. void AddFilesToList(SAFEARRAY * pFileArray, TFileList * pList);
  62. };
  63. #endif // !defined(AFX_PROFMMGR_H__A20E4BA9_0CF9_4BE9_9530_B41E844C56C2__INCLUDED_)