shappmgr.idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:5k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7. cpp_quote("#ifndef _SHAPPMGR_H_")
  8. cpp_quote("#define _SHAPPMGR_H_")
  9. //
  10. // shappmgr.idl : IDL source for shappmgr.h
  11. //
  12. import "oaidl.idl";
  13. import "ocidl.idl";
  14. import "appmgmt.h";
  15. //
  16. // IShellApp interface
  17. //
  18. [
  19.     uuid(A3E14960-935F-11D1-B8B8-006008059382),     // IID_IShellApp
  20.     object
  21. ]
  22. interface IShellApp : IUnknown
  23. {
  24.     typedef enum _tagAppInfoFlags {
  25.         AIM_DISPLAYNAME           = 0x00000001,
  26.         AIM_VERSION               = 0x00000002,
  27.         AIM_PUBLISHER             = 0x00000004,
  28.         AIM_PRODUCTID             = 0x00000008,
  29.         AIM_REGISTEREDOWNER       = 0x00000010,
  30.         AIM_REGISTEREDCOMPANY     = 0x00000020,
  31.         AIM_LANGUAGE              = 0x00000040,
  32.         AIM_SUPPORTURL            = 0x00000080,
  33.         AIM_SUPPORTTELEPHONE      = 0x00000100,
  34.         AIM_HELPLINK              = 0x00000200,
  35.         AIM_INSTALLLOCATION       = 0x00000400,
  36.         AIM_INSTALLSOURCE         = 0x00000800,
  37.         AIM_INSTALLDATE           = 0x00001000,
  38. //        AIM_REQUIREDBYPOLICY      = 0x00002000,  Obsolete. Do not reuse.
  39.         AIM_CONTACT               = 0x00004000,
  40.         AIM_COMMENTS              = 0x00008000,
  41.         AIM_IMAGE                 = 0x00020000,
  42.         AIM_READMEURL             = 0x00040000,
  43.         AIM_UPDATEINFOURL         = 0x00080000
  44.     } APPINFODATAFLAGS;
  45.     typedef struct _AppInfoData {
  46.         DWORD cbSize;
  47.         DWORD dwMask;                // APPINFODATAFLAGS, IN/OUT
  48.         LPWSTR pszDisplayName;
  49.         LPWSTR pszVersion;
  50.         LPWSTR pszPublisher;
  51.         LPWSTR pszProductID;
  52.         LPWSTR pszRegisteredOwner;
  53.         LPWSTR pszRegisteredCompany;
  54.         LPWSTR pszLanguage;
  55.         LPWSTR pszSupportUrl;
  56.         LPWSTR pszSupportTelephone;
  57.         LPWSTR pszHelpLink;
  58.         LPWSTR pszInstallLocation;
  59.         LPWSTR pszInstallSource;
  60.         LPWSTR pszInstallDate;
  61.         LPWSTR pszContact;
  62.         LPWSTR pszComments;
  63.         LPWSTR pszImage;
  64.         LPWSTR pszReadmeUrl;
  65.         LPWSTR pszUpdateInfoUrl;
  66.     } APPINFODATA, *PAPPINFODATA;
  67.     HRESULT GetAppInfo([in, out] PAPPINFODATA pai);
  68.     typedef enum _tagAppActionFlags {
  69.         APPACTION_INSTALL      = 0x00000001,
  70.         APPACTION_UNINSTALL    = 0x00000002,
  71.         APPACTION_MODIFY       = 0x00000004,
  72.         APPACTION_REPAIR       = 0x00000008,
  73.         APPACTION_UPGRADE      = 0x00000010,
  74.         APPACTION_CANGETSIZE   = 0x00000020,
  75.         APPACTION_MODIFYREMOVE = 0x00000080,
  76.         APPACTION_ADDLATER     = 0x00000100,
  77.         APPACTION_UNSCHEDULE   = 0x00000200
  78.     } APPACTIONFLAGS;
  79.     HRESULT GetPossibleActions([out] DWORD * pdwActions);
  80.     //
  81.     // Synchronously obtains the slow info for the app. This method call
  82.     // can be very slow.
  83.     //
  84.     typedef struct _tagSlowAppInfo {
  85.         ULONGLONG ullSize;
  86.         FILETIME  ftLastUsed;
  87.         int       iTimesUsed;
  88.         LPWSTR    pszImage;
  89.     } SLOWAPPINFO, *PSLOWAPPINFO;
  90.     HRESULT GetSlowAppInfo([in] PSLOWAPPINFO psaid);
  91.     //
  92.     // Obtain the cached slow info for the app, this will be fast.
  93.     //
  94.     HRESULT GetCachedSlowAppInfo([in] PSLOWAPPINFO psaid);
  95.     //
  96.     // Returns S_OK if installed S_FALSE if not installed
  97.     //
  98.     HRESULT IsInstalled(void);
  99. };
  100. //
  101. // IPublishedApp interface
  102. //
  103. [
  104.     uuid(1BC752E0-9046-11D1-B8B3-006008059382),     // IID_IPublishedApp
  105.     object
  106. ]
  107. interface IPublishedApp : IShellApp
  108. {
  109.     typedef enum _tagPublishedAppInfoFlags {
  110.         PAI_SOURCE        = 0x00000001,
  111.         PAI_ASSIGNEDTIME  = 0x00000002,
  112.         PAI_PUBLISHEDTIME = 0x00000004,
  113.         PAI_SCHEDULEDTIME = 0x00000008,
  114.         PAI_EXPIRETIME    = 0x00000010
  115.     } PUBAPPINFOFLAGS;
  116.     typedef struct _PubAppInfo {
  117.         DWORD cbSize;
  118.         DWORD dwMask;              // PUBAPPINFOFLAGS, IN/OUT
  119.         LPWSTR pszSource;
  120.         SYSTEMTIME  stAssigned;
  121.         SYSTEMTIME  stPublished;
  122.         SYSTEMTIME  stScheduled;
  123.         SYSTEMTIME  stExpire;
  124.     } PUBAPPINFO, *PPUBAPPINFO;
  125.     HRESULT Install([in]LPSYSTEMTIME pstInstall);
  126.     HRESULT GetPublishedAppInfo([in, out] PPUBAPPINFO ppai);
  127.     HRESULT Unschedule(void);
  128. };
  129. //
  130. // IEnumPublishedApps interface
  131. //
  132. [
  133.     uuid(0B124F8C-91F0-11D1-B8B5-006008059382),     // IID_IEnumPublishedApps
  134.     object
  135. ]
  136. interface IEnumPublishedApps : IUnknown
  137. {
  138.     HRESULT Next([out] IPublishedApp** pia);
  139.     HRESULT Reset(void);
  140. };
  141. //
  142. // IAppPublisher interface
  143. //
  144. [
  145.     uuid(07250A10-9CF9-11D1-9076-006008059382),     // IID_IAppPublisher
  146.     object
  147. ]
  148. interface IAppPublisher : IUnknown
  149. {
  150.     HRESULT GetNumberOfCategories(DWORD * pdwCat);
  151.     HRESULT GetCategories(APPCATEGORYINFOLIST * pAppCategoryList);
  152.     HRESULT GetNumberOfApps(DWORD * pdwApps);
  153.     HRESULT EnumApps(GUID * pAppCategoryId, IEnumPublishedApps ** ppepa);
  154. }
  155. cpp_quote("#endif // _SHAPPMGR_H_")