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.

75 lines
2.2 KiB

  1. #ifndef __APPMGR_H_
  2. #define __APPMGR_H_
  3. #define REGSTR_PATH_APPPUBLISHER TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\App Management\\Publishers")
  4. // Structure to contain the list of GUIDs for a category
  5. typedef struct _GuidList
  6. {
  7. GUID CatGuid;
  8. IAppPublisher * papSupport;
  9. struct _GuidList * pNextGuid;
  10. } GUIDLIST;
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CShellAppManager
  13. class CShellAppManager : public IShellAppManager
  14. {
  15. public:
  16. CShellAppManager();
  17. // *** IUnknown Methods
  18. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  19. virtual STDMETHODIMP_(ULONG) AddRef(void) ;
  20. virtual STDMETHODIMP_(ULONG) Release(void);
  21. // *** IShellAppManager
  22. STDMETHODIMP GetNumberofInstalledApps(DWORD * pdwResult);
  23. STDMETHODIMP EnumInstalledApps(IEnumInstalledApps ** ppeia);
  24. STDMETHODIMP GetPublishedAppCategories(PSHELLAPPCATEGORYLIST psacl);
  25. STDMETHODIMP EnumPublishedApps(LPCWSTR pszCategory, IEnumPublishedApps ** ppepa);
  26. STDMETHODIMP InstallFromFloppyOrCDROM(HWND hwndParent);
  27. protected:
  28. virtual ~CShellAppManager();
  29. LONG _cRef;
  30. // App Publisher List
  31. HDPA _hdpaPub;
  32. // Item of the Internal Category List
  33. #define CATEGORYLIST_GROW 16
  34. typedef struct _CategoryItem
  35. {
  36. LPWSTR pszDescription;
  37. GUIDLIST * pGuidList;
  38. } CATEGORYITEM;
  39. // Category List
  40. HDSA _hdsaCategoryList;
  41. void _Lock(void);
  42. void _Unlock(void);
  43. CRITICAL_SECTION _cs;
  44. DEBUG_CODE( LONG _cRefLock; )
  45. // Internal structure funcitons
  46. void _DestroyGuidList(GUIDLIST * pGuidList);
  47. HRESULT _AddCategoryToList(APPCATEGORYINFO * pai, IAppPublisher * pap);
  48. HRESULT _BuildInternalCategoryList(void);
  49. HRESULT _CompileCategoryList(PSHELLAPPCATEGORYLIST pascl);
  50. void _DestroyCategoryItem(CATEGORYITEM * pci);
  51. void _DestroyInternalCategoryList(void);
  52. void _DestroyAppPublisherList(void);
  53. GUIDLIST * _FindGuidListForCategory(LPCWSTR pszDescription);
  54. BOOL _bCreatedTSMsiHack; // The "EnableAdminRemote" value for MSI to work on TS
  55. };
  56. #endif //__APPMGR_H_