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.

58 lines
2.0 KiB

  1. //=============================================================================
  2. // The CMSInfoTool class encapsulates a tool (which can appear on the Tools
  3. // menu or as part of a context sensitive menu).
  4. //=============================================================================
  5. #pragma once
  6. extern void RemoveToolset(CMapWordToPtr & map);
  7. extern void LoadGlobalToolset(CMapWordToPtr & map, HKEY hkeyTools = NULL);
  8. extern void LoadGlobalToolsetWithOpenCAB(CMapWordToPtr & map, LPCTSTR szCABDir, HKEY hkeyTools = NULL);
  9. struct MSITOOLINFO
  10. {
  11. UINT m_uiNameID;
  12. UINT m_uiDescriptionID;
  13. LPCTSTR m_szCommand;
  14. LPCTSTR m_szParams;
  15. LPCTSTR m_szCABCommand;
  16. LPCTSTR m_szCABExtension;
  17. LPCTSTR m_szCABParams;
  18. };
  19. class CMSInfoTool
  20. {
  21. public:
  22. CMSInfoTool() : m_dwParentID(0), m_fHasSubitems(FALSE), m_hmenu(NULL) {};
  23. ~CMSInfoTool() {};
  24. BOOL LoadGlobalFromRegistry(HKEY hkeyTool, DWORD dwID, BOOL fCABOpen, CMapWordToPtr & map);
  25. BOOL LoadGlobalFromMSITOOLINFO(DWORD dwID, MSITOOLINFO * pTool, BOOL fCABOpen);
  26. void Create(DWORD dwID, BOOL fCABOnly, LPCTSTR szName, LPCTSTR szCommand, LPCTSTR szDesc, LPCTSTR szParam, LPCTSTR szCABCommand, LPCTSTR szCABExt, LPCTSTR szCABParam);
  27. void Execute();
  28. DWORD GetID() { return m_dwID; };
  29. DWORD GetParentID() { return m_dwParentID; };
  30. CString GetName() { return m_strName; };
  31. CString GetCABExtensions() { return (m_fCABOpen) ? m_strCABExtension : CString(_T("")); };
  32. BOOL HasSubitems() { return m_fHasSubitems; };
  33. void Replace(LPCTSTR szReplace, LPCTSTR szWith);
  34. CMSInfoTool * CloneTool(DWORD dwID, LPCTSTR szName);
  35. void SetHMENU(HMENU hmenu) { m_hmenu = hmenu; };
  36. HMENU GetHMENU() { return m_hmenu; };
  37. private:
  38. DWORD m_dwID;
  39. DWORD m_dwParentID;
  40. BOOL m_fCABOpen;
  41. BOOL m_fHasSubitems;
  42. CString m_strName;
  43. CString m_strCommand;
  44. CString m_strDescription;
  45. CString m_strParameters;
  46. CString m_strCABCommand;
  47. CString m_strCABExtension;
  48. CString m_strCABParameters;
  49. HMENU m_hmenu;
  50. };