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.

536 lines
19 KiB

  1. //=--------------------------------------------------------------------------=
  2. // inseng.h
  3. //=--------------------------------------------------------------------------=
  4. // Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.
  5. //
  6. //
  7. // interface declaration for the InstallEngine control.
  8. //
  9. #ifndef _INSENG_H_
  10. #ifdef __cplusplus
  11. extern "C"{
  12. #endif
  13. #define MAX_ID_LENGTH 48
  14. #define MAX_DISPLAYNAME_LENGTH 128
  15. #define ICI_NOTINSTALLED 0
  16. #define ICI_INSTALLED 1
  17. #define ICI_NEWVERSIONAVAILABLE 2
  18. #define ICI_UNKNOWN 3
  19. #define ICI_OLDVERSIONAVAILABLE 4
  20. #define ICI_NOTINITIALIZED 0xffffffff
  21. #define ABORTINSTALL_NORMAL 0
  22. #define ABORTINSTALL_IMMEADIATE 1
  23. #define ENGINESTATUS_NOTREADY 0
  24. #define ENGINESTATUS_LOADING 1
  25. #define ENGINESTATUS_INSTALLING 2
  26. #define ENGINESTATUS_READY 3
  27. #define CDINSTALL 1
  28. #define WEBINSTALL 2
  29. #define WEBINSTALL_DIFFERENTMACHINE 3
  30. #define NETWORKINSTALL 4
  31. #define LOCALINSTALL 5
  32. #define DEP_NEVER_INSTALL 'N'
  33. #define DEP_INSTALL 'I'
  34. #define SETACTION_NONE 0x00000000
  35. #define SETACTION_INSTALL 0x00000001
  36. #define INSTALLOPTIONS_NOCACHE 0x00000001
  37. #define INSTALLOPTIONS_DOWNLOAD 0x00000002
  38. #define INSTALLOPTIONS_INSTALL 0x00000004
  39. #define INSTALLOPTIONS_DONTALLOWXPLATFORM 0x00000008
  40. #define INSTALLOPTIONS_FORCEDEPENDENCIES 0x00000010
  41. #define EXECUTEJOB_SILENT 0x00000001
  42. #define EXECUTEJOB_DELETE_JOB 0x00000002
  43. #define EXECUTEJOB_VERIFYFILES 0x00000008
  44. #define EXECUTEJOB_IGNORETRUST 0x00000010
  45. #define EXECUTEJOB_IGNOREDOWNLOADERROR 0x00000020
  46. #define EXECUTEJOB_DONTALLOWCANCEL 0x00000040
  47. #define E_FILESMISSING _HRESULT_TYPEDEF_(0x80100003L)
  48. HRESULT WINAPI CheckTrust(LPCSTR pszFilename, HWND hwndForUI, BOOL bShowBadUI);
  49. HRESULT WINAPI CheckTrustEx(LPCSTR szURL, LPCSTR szFilename, HWND hwndForUI, BOOL bShowBadUI, DWORD dwReserved);
  50. HRESULT WINAPI PurgeDownloadDir(LPCSTR pszDir);
  51. HRESULT WINAPI CheckForVersionConflict();
  52. typedef struct
  53. {
  54. DWORD cbSize;
  55. DWORD dwInstallSize;
  56. DWORD dwWinDriveSize;
  57. DWORD dwDownloadSize;
  58. DWORD dwDependancySize;
  59. DWORD dwInstallDriveReq;
  60. DWORD dwWinDriveReq;
  61. DWORD dwDownloadDriveReq;
  62. CHAR chWinDrive;
  63. CHAR chInstallDrive;
  64. CHAR chDownloadDrive;
  65. DWORD dwTotalDownloadSize;
  66. } COMPONENT_SIZES;
  67. typedef struct
  68. {
  69. DWORD cbSize;
  70. DWORD dwDownloadKBRemaining;
  71. DWORD dwInstallKBRemaining;
  72. DWORD dwDownloadSecsRemaining;
  73. DWORD dwInstallSecsRemaining;
  74. } INSTALLPROGRESS;
  75. enum InstallStatus
  76. {
  77. INSTALLSTATUS_INITIALIZING,
  78. INSTALLSTATUS_DEPENDENCY,
  79. INSTALLSTATUS_DOWNLOADING,
  80. INSTALLSTATUS_COPYING,
  81. INSTALLSTATUS_RETRYING,
  82. INSTALLSTATUS_CHECKINGTRUST,
  83. INSTALLSTATUS_EXTRACTING,
  84. INSTALLSTATUS_RUNNING,
  85. INSTALLSTATUS_FINISHED,
  86. INSTALLSTATUS_DOWNLOADFINISHED
  87. };
  88. // defines for engine problems (OnEngineProblem)
  89. #define ENGINEPROBLEM_DOWNLOADFAIL 0x00000001
  90. // Actions particular to ENGINEPROBLEM_DOWNLOAD
  91. #define DOWNLOADFAIL_RETRY 0x00000001
  92. #define STOPINSTALL_REBOOTNEEDED 0x00000001
  93. #define STOPINSTALL_REBOOTREFUSED 0x00000002
  94. DEFINE_GUID(IID_IInstallEngineCallback,0x6E449685L,0xC509,0x11CF,0xAA,0xFA,0x00,0xAA,0x00,0xB6,0x01,0x5C);
  95. #undef INTERFACE
  96. #define INTERFACE IInstallEngineCallback
  97. DECLARE_INTERFACE_(IInstallEngineCallback, IUnknown)
  98. {
  99. // *** IUnknown methods ***
  100. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  101. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  102. STDMETHOD_(ULONG,Release) (THIS) PURE;
  103. STDMETHOD(OnEngineStatusChange)(THIS_ DWORD dwEngineStatus, DWORD substatus) PURE;
  104. STDMETHOD(OnStartInstall)(THIS_ DWORD dwDLSize, DWORD dwInstallSize) PURE;
  105. STDMETHOD(OnStartComponent)(THIS_ LPCSTR pszID, DWORD dwDLSize, DWORD dwInstallSize, LPCSTR pszString) PURE;
  106. STDMETHOD(OnComponentProgress)(THIS_ LPCSTR pszID, DWORD dwPhase, LPCSTR pszString, LPCSTR pszMsgString, ULONG progress, ULONG themax) PURE;
  107. STDMETHOD(OnStopComponent)(THIS_ LPCSTR pszID, HRESULT hError, DWORD dwPhase, LPCSTR pszString, DWORD dwStatus) PURE;
  108. STDMETHOD(OnStopInstall)(THIS_ HRESULT hrError, LPCSTR szError, DWORD dwStatus) PURE;
  109. STDMETHOD(OnEngineProblem)(THIS_ DWORD dwEngineProblem, LPDWORD dwAction) PURE;
  110. };
  111. DEFINE_GUID(IID_IInstallEngine,0x6E449684L,0xC509,0x11CF,0xAA,0xFA,0x00,0xAA,0x00,0xB6,0x01,0x5C);
  112. #undef INTERFACE
  113. #define INTERFACE IInstallEngine
  114. DECLARE_INTERFACE_(IInstallEngine , IUnknown)
  115. {
  116. // *** IUnknown methods ***
  117. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  118. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  119. STDMETHOD_(ULONG,Release) (THIS) PURE;
  120. // Methods to set engine up for install
  121. STDMETHOD(GetEngineStatus)(THIS_ DWORD *theenginestatus) PURE;
  122. STDMETHOD(SetCifFile)(THIS_ LPCSTR pszCabName, LPCSTR pszCifName) PURE;
  123. STDMETHOD(DownloadComponents)(THIS_ DWORD dwFlags) PURE;
  124. STDMETHOD(InstallComponents)(THIS_ DWORD dwFlags) PURE;
  125. STDMETHOD(EnumInstallIDs)(THIS_ UINT uIndex, LPSTR *ppszID) PURE;
  126. STDMETHOD(EnumDownloadIDs)(THIS_ UINT uIndex, LPSTR *ppszID) PURE;
  127. STDMETHOD(IsComponentInstalled)(THIS_ LPCSTR pszID, DWORD *pdwStatus) PURE;
  128. STDMETHOD(RegisterInstallEngineCallback)(THIS_ IInstallEngineCallback *pcb) PURE;
  129. STDMETHOD(UnregisterInstallEngineCallback)(THIS) PURE;
  130. STDMETHOD(SetAction)(THIS_ LPCSTR pszID, DWORD dwAction, DWORD dwPriority) PURE;
  131. STDMETHOD(GetSizes)(THIS_ LPCSTR pszID, COMPONENT_SIZES *pSizes) PURE;
  132. STDMETHOD(LaunchExtraCommand)(THIS_ LPCSTR pszInfName, LPCSTR pszSection) PURE;
  133. STDMETHOD(GetDisplayName)(THIS_ LPCSTR pszID, LPSTR *ppszName) PURE;
  134. // Info about the install (should be structure to fill in
  135. // like GetBindInfo (GetInstallInfo)
  136. STDMETHOD(SetBaseUrl)(THIS_ LPCSTR pszBaseName) PURE;
  137. STDMETHOD(SetDownloadDir)(THIS_ LPCSTR pszDownloadDir) PURE;
  138. STDMETHOD(SetInstallDrive)(THIS_ CHAR chDrive) PURE;
  139. STDMETHOD(SetInstallOptions)(THIS_ DWORD dwInsFlag) PURE;
  140. STDMETHOD(SetHWND)(THIS_ HWND hForUI) PURE;
  141. STDMETHOD(SetIStream)(THIS_ IStream *pstm) PURE;
  142. // Engine control during installation (seperate interface?)
  143. STDMETHOD(Abort)(THIS_ DWORD dwFlags) PURE;
  144. STDMETHOD(Suspend)(THIS) PURE;
  145. STDMETHOD(Resume)(THIS) PURE;
  146. };
  147. DEFINE_GUID(IID_IInstallEngineTiming,0x6E449687L,0xC509,0x11CF,0xAA,0xFA,0x00,0xAA,0x00,0xB6,0x01,0x5C);
  148. #undef INTERFACE
  149. #define INTERFACE IInstallEngineTiming
  150. DECLARE_INTERFACE_(IInstallEngineTiming , IUnknown)
  151. {
  152. // *** IUnknown methods ***
  153. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  154. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  155. STDMETHOD_(ULONG,Release) (THIS) PURE;
  156. STDMETHOD(GetRates)(THIS_ DWORD *pdwDownload, DWORD *pdwInstall) PURE;
  157. STDMETHOD(GetInstallProgress)(THIS_ INSTALLPROGRESS *pinsprog) PURE;
  158. };
  159. DEFINE_GUID(CLSID_InstallEngine,0x6E449686L,0xC509,0x11CF,0xAA,0xFA,0x00,0xAA,0x00,0xB6,0x01,0x5C);
  160. // The site manager interface
  161. typedef struct
  162. {
  163. UINT cbSize;
  164. LPSTR pszLang;
  165. LPSTR pszRegion;
  166. } SITEQUERYPARAMS;
  167. typedef struct
  168. {
  169. UINT cbSize;
  170. LPSTR pszUrl;
  171. LPSTR pszFriendlyName;
  172. LPSTR pszLang;
  173. LPSTR pszRegion;
  174. } DOWNLOADSITE;
  175. // {BFC880F3-7484-11d0-8309-00AA00B6015C}
  176. DEFINE_GUID(IID_IDownloadSite,
  177. 0xbfc880f3, 0x7484, 0x11d0, 0x83, 0x9, 0x0, 0xaa, 0x0, 0xb6, 0x1, 0x5c);
  178. #undef INTERFACE
  179. #define INTERFACE IDownloadSite
  180. DECLARE_INTERFACE_(IDownloadSite , IUnknown)
  181. {
  182. // *** IUnknown methods ***
  183. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  184. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  185. STDMETHOD_(ULONG,Release) (THIS) PURE;
  186. STDMETHOD(GetData)(THIS_ DOWNLOADSITE **pds) PURE;
  187. };
  188. // {BFC880F0-7484-11d0-8309-00AA00B6015C}
  189. DEFINE_GUID(IID_IDownloadSiteMgr,
  190. 0xbfc880f0, 0x7484, 0x11d0, 0x83, 0x9, 0x0, 0xaa, 0x0, 0xb6, 0x1, 0x5c);
  191. #undef INTERFACE
  192. #define INTERFACE IDownloadSiteMgr
  193. DECLARE_INTERFACE_(IDownloadSiteMgr , IUnknown)
  194. {
  195. // *** IUnknown methods ***
  196. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  197. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  198. STDMETHOD_(ULONG,Release) (THIS) PURE;
  199. STDMETHOD(Initialize)(THIS_ LPCSTR pszUrl, SITEQUERYPARAMS *pqp) PURE;
  200. STDMETHOD(EnumSites)(THIS_ DWORD dwIndex, IDownloadSite **pds) PURE;
  201. };
  202. // {BFC880F1-7484-11d0-8309-00AA00B6015C}
  203. DEFINE_GUID(CLSID_DownloadSiteMgr,
  204. 0xbfc880f1, 0x7484, 0x11d0, 0x83, 0x9, 0x0, 0xaa, 0x0, 0xb6, 0x1, 0x5c);
  205. // defines for dwUrlFlags
  206. #define URLF_DEFAULT 0x00000000
  207. #define URLF_EXTRACT 0x00000001
  208. #define URLF_RELATIVEURL 0x00000002
  209. #define URLF_DELETE_AFTER_EXTRACT 0x00000004
  210. // types of dependancies
  211. #define DEP_NEVER_INSTALL 'N'
  212. #define DEP_INSTALL 'I'
  213. // platform defines
  214. #define PLATFORM_WIN95 0x00000001
  215. #define PLATFORM_WIN98 0x00000002
  216. #define PLATFORM_NT4 0x00000004
  217. #define PLATFORM_NT5 0x00000008
  218. #define PLATFORM_NT4ALPHA 0x00000010
  219. #define PLATFORM_NT5ALPHA 0x00000020
  220. #define PLATFORM_MILLEN 0x00000040
  221. #define PLATFORM_ALL PLATFORM_WIN95 | PLATFORM_WIN98 | PLATFORM_NT4 | PLATFORM_NT5 | PLATFORM_NT4ALPHA | PLATFORM_NT5ALPHA | PLATFORM_MILLEN
  222. // The action to be taken on this component ((Get)SetInstallQueueStatus, SetAction
  223. enum ComponentAction { ActionNone, ActionInstall, ActionUninstall };
  224. // Type for commands
  225. // 0 1 2 3 4
  226. enum CommandType { InfCommand, WExtractExe, Win32Exe, InfExCommand, HRESULTWin32Exe };
  227. #undef INTERFACE
  228. #define INTERFACE ICifComponent
  229. DECLARE_INTERFACE(ICifComponent)
  230. {
  231. // for properties
  232. STDMETHOD(GetID)(THIS_ LPSTR pszID, DWORD dwSize)PURE;
  233. STDMETHOD(GetGUID)(THIS_ LPSTR pszGUID, DWORD dwSize)PURE;
  234. STDMETHOD(GetDescription)(THIS_ LPSTR pszDesc, DWORD dwSize)PURE;
  235. STDMETHOD(GetDetails)(THIS_ LPSTR pszDetails, DWORD dwSize) PURE;
  236. STDMETHOD(GetUrl)(THIS_ UINT uUrlNum, LPSTR pszUrl, DWORD dwSize, LPDWORD pdwUrlFlags) PURE;
  237. STDMETHOD(GetFileExtractList)(THIS_ UINT uUrlNum, LPSTR pszExtract, DWORD dwSize) PURE;
  238. STDMETHOD(GetUrlCheckRange)(THIS_ UINT uUrlNum, LPDWORD pdwMin, LPDWORD pdwMax) PURE;
  239. STDMETHOD(GetCommand)(THIS_ UINT uCmdNum, LPSTR pszCmd, DWORD dwCmdSize, LPSTR pszSwitches,
  240. DWORD dwSwitchSize, LPDWORD pdwType) PURE;
  241. STDMETHOD(GetVersion)(THIS_ LPDWORD pdwVersion, LPDWORD pdwBuild) PURE;
  242. STDMETHOD(GetLocale)(THIS_ LPSTR pszLocale, DWORD dwSize) PURE;
  243. STDMETHOD(GetUninstallKey)(THIS_ LPSTR pszKey, DWORD dwSize) PURE;
  244. STDMETHOD(GetInstalledSize)(THIS_ LPDWORD pdwWin, LPDWORD pdwApp) PURE;
  245. STDMETHOD_(DWORD, GetDownloadSize)(THIS) PURE;
  246. STDMETHOD_(DWORD, GetExtractSize)(THIS) PURE;
  247. STDMETHOD(GetSuccessKey)(THIS_ LPSTR pszKey, DWORD dwSize) PURE;
  248. STDMETHOD(GetProgressKeys)(THIS_ LPSTR pszProgress, DWORD dwProgSize,
  249. LPSTR pszCancel, DWORD dwCancelSize) PURE;
  250. STDMETHOD(IsActiveSetupAware)(THIS) PURE;
  251. STDMETHOD(IsRebootRequired)(THIS) PURE;
  252. STDMETHOD(RequiresAdminRights)(THIS) PURE;
  253. STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
  254. STDMETHOD(GetDependency)(THIS_ UINT uDepNum, LPSTR pszID, DWORD dwBuf, char *pchType, LPDWORD pdwVer, LPDWORD pdwBuild) PURE;
  255. STDMETHOD_(DWORD, GetPlatform)(THIS) PURE;
  256. STDMETHOD(GetMode)(THIS_ UINT uModeNum, LPSTR pszMode, DWORD dwSize) PURE;
  257. STDMETHOD(GetGroup)(THIS_ LPSTR pszID, DWORD dwSize) PURE;
  258. STDMETHOD(IsUIVisible)(THIS) PURE;
  259. STDMETHOD(GetPatchID)(THIS_ LPSTR pszID, DWORD dwSize) PURE;
  260. STDMETHOD(GetDetVersion)(THIS_ LPSTR pszDLL, DWORD dwdllSize, LPSTR pszEntry, DWORD dwentSize) PURE;
  261. STDMETHOD(GetTreatAsOneComponents)(THIS_ UINT uNum, LPSTR pszID, DWORD dwBuf) PURE;
  262. STDMETHOD(GetCustomData)(LPSTR pszKey, LPSTR pszData, DWORD dwSize) PURE;
  263. // access to state
  264. STDMETHOD_(DWORD, IsComponentInstalled)(THIS) PURE;
  265. STDMETHOD(IsComponentDownloaded)(THIS) PURE;
  266. STDMETHOD_(DWORD, IsThisVersionInstalled)(THIS_ DWORD dwAskVer, DWORD dwAskBld, LPDWORD pdwVersion, LPDWORD pdwBuild) PURE;
  267. STDMETHOD_(DWORD, GetInstallQueueState)(THIS) PURE;
  268. STDMETHOD(SetInstallQueueState)(THIS_ DWORD dwState) PURE;
  269. STDMETHOD_(DWORD, GetActualDownloadSize)(THIS) PURE;
  270. STDMETHOD_(DWORD, GetCurrentPriority)(THIS) PURE;
  271. STDMETHOD(SetCurrentPriority)(THIS_ DWORD dwPriority) PURE;
  272. };
  273. DECLARE_INTERFACE_(ICifRWComponent, ICifComponent)
  274. {
  275. STDMETHOD(SetGUID)(THIS_ LPCSTR pszGUID)PURE;
  276. STDMETHOD(SetDescription)(THIS_ LPCSTR pszDesc)PURE;
  277. STDMETHOD(SetUrl)(THIS_ UINT uUrlNum, LPCSTR pszUrl, DWORD dwUrlFlags) PURE;
  278. STDMETHOD(SetCommand)(THIS_ UINT uCmdNum, LPCSTR pszCmd, LPCSTR pszSwitches, DWORD dwType) PURE;
  279. STDMETHOD(SetVersion)(THIS_ LPCSTR pszVersion) PURE;
  280. STDMETHOD(SetUninstallKey)(THIS_ LPCSTR pszKey) PURE;
  281. STDMETHOD(SetInstalledSize)(THIS_ DWORD dwWin, DWORD dwApp) PURE;
  282. STDMETHOD(SetDownloadSize)(THIS_ DWORD) PURE;
  283. STDMETHOD(SetExtractSize)(THIS_ DWORD) PURE;
  284. STDMETHOD(DeleteDependency)(THIS_ LPCSTR pszID, char chType) PURE;
  285. STDMETHOD(AddDependency)(THIS_ LPCSTR pszID, char chType) PURE;
  286. STDMETHOD(SetUIVisible)(THIS_ BOOL) PURE;
  287. STDMETHOD(SetGroup)(THIS_ LPCSTR pszID) PURE;
  288. STDMETHOD(SetPlatform)(THIS_ DWORD) PURE;
  289. STDMETHOD(SetPriority)(THIS_ DWORD) PURE;
  290. STDMETHOD(SetReboot)(THIS_ BOOL) PURE;
  291. STDMETHOD(DeleteFromModes)(THIS_ LPCSTR pszMode) PURE;
  292. STDMETHOD(AddToMode)(THIS_ LPCSTR pszMode) PURE;
  293. STDMETHOD(SetModes)(THIS_ LPCSTR pszMode) PURE;
  294. STDMETHOD(CopyComponent)(THIS_ LPCSTR pszCifFile) PURE;
  295. STDMETHOD(AddToTreatAsOne)(THIS_ LPCSTR pszCompID) PURE;
  296. STDMETHOD(SetDetails)(THIS_ LPCSTR pszDesc) PURE;
  297. };
  298. DECLARE_INTERFACE_(IEnumCifComponents, IUnknown)
  299. {
  300. // *** IUnknown methods ***
  301. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  302. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  303. STDMETHOD_(ULONG,Release) (THIS) PURE;
  304. // enum methods
  305. STDMETHOD(Next)(THIS_ ICifComponent **) PURE;
  306. STDMETHOD(Reset)(THIS) PURE;
  307. };
  308. DECLARE_INTERFACE(ICifGroup)
  309. {
  310. // for properties
  311. STDMETHOD(GetID)(THIS_ LPSTR pszID, DWORD dwSize) PURE;
  312. STDMETHOD(GetDescription)(THIS_ LPSTR pszDesc, DWORD dwSize) PURE;
  313. STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
  314. STDMETHOD(EnumComponents)(THIS_ IEnumCifComponents **, DWORD dwFilter, LPVOID pv) PURE;
  315. STDMETHOD_(DWORD, GetCurrentPriority)(THIS) PURE;
  316. };
  317. DECLARE_INTERFACE_(ICifRWGroup, ICifGroup)
  318. {
  319. STDMETHOD(SetDescription)(THIS_ LPCSTR pszDesc) PURE;
  320. STDMETHOD(SetPriority)(THIS_ DWORD) PURE;
  321. STDMETHOD(SetDetails)(THIS_ LPCSTR pszDetails) PURE;
  322. };
  323. DECLARE_INTERFACE_(IEnumCifGroups, IUnknown)
  324. {
  325. // *** IUnknown methods ***
  326. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  327. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  328. STDMETHOD_(ULONG,Release) (THIS) PURE;
  329. // enum methods
  330. STDMETHOD(Next)(THIS_ ICifGroup **) PURE;
  331. STDMETHOD(Reset)(THIS) PURE;
  332. };
  333. DECLARE_INTERFACE(ICifMode)
  334. {
  335. // for properties
  336. STDMETHOD(GetID)(THIS_ LPSTR pszID, DWORD dwSize) PURE;
  337. STDMETHOD(GetDescription)(THIS_ LPSTR pszDesc, DWORD dwSize) PURE;
  338. STDMETHOD(GetDetails)(THIS_ LPSTR pszDetails, DWORD dwSize) PURE;
  339. STDMETHOD(EnumComponents)(THIS_ IEnumCifComponents **, DWORD dwFilter, LPVOID pv) PURE;
  340. };
  341. DECLARE_INTERFACE_(ICifRWMode, ICifMode)
  342. {
  343. STDMETHOD(SetDescription)(THIS_ LPCSTR pszDesc) PURE;
  344. STDMETHOD(SetDetails)(THIS_ LPCSTR pszDetails) PURE;
  345. };
  346. DECLARE_INTERFACE_(IEnumCifModes, IUnknown)
  347. {
  348. // *** IUnknown methods ***
  349. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  350. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  351. STDMETHOD_(ULONG,Release) (THIS) PURE;
  352. // enum methods
  353. STDMETHOD(Next)(THIS_ ICifMode **) PURE;
  354. STDMETHOD(Reset)(THIS) PURE;
  355. };
  356. DEFINE_GUID(IID_ICifFile,0x6E449688L,0xC509,0x11CF,0xAA,0xFA,0x00,0xAA,0x00,0xB6,0x01,0x5C);
  357. DECLARE_INTERFACE_(ICifFile, IUnknown)
  358. {
  359. // *** IUnknown methods ***
  360. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  361. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  362. STDMETHOD_(ULONG,Release) (THIS) PURE;
  363. STDMETHOD(EnumComponents)(THIS_ IEnumCifComponents **, DWORD dwFilter, LPVOID pv) PURE;
  364. STDMETHOD(FindComponent)(THIS_ LPCSTR pszID, ICifComponent **p) PURE;
  365. STDMETHOD(EnumGroups)(THIS_ IEnumCifGroups **, DWORD dwFilter, LPVOID pv) PURE;
  366. STDMETHOD(FindGroup)(THIS_ LPCSTR pszID, ICifGroup **p) PURE;
  367. STDMETHOD(EnumModes)(THIS_ IEnumCifModes **, DWORD dwFilter, LPVOID pv) PURE;
  368. STDMETHOD(FindMode)(THIS_ LPCSTR pszID, ICifMode **p) PURE;
  369. STDMETHOD(GetDescription)(THIS_ LPSTR pszDesc, DWORD dwSize) PURE;
  370. STDMETHOD(GetDetDlls)(THIS_ LPSTR pszDlls, DWORD dwSize) PURE;
  371. };
  372. DECLARE_INTERFACE_(ICifRWFile, ICifFile)
  373. {
  374. STDMETHOD(SetDescription)(THIS_ LPCSTR pszDesc) PURE;
  375. STDMETHOD(CreateComponent)(THIS_ LPCSTR pszID, ICifRWComponent **p) PURE;
  376. STDMETHOD(CreateGroup)(THIS_ LPCSTR pszID, ICifRWGroup **p) PURE;
  377. STDMETHOD(CreateMode)(THIS_ LPCSTR pszID, ICifRWMode **p) PURE;
  378. STDMETHOD(DeleteComponent)(THIS_ LPCSTR pszID) PURE;
  379. STDMETHOD(DeleteGroup)(THIS_ LPCSTR pszID) PURE;
  380. STDMETHOD(DeleteMode)(THIS_ LPCSTR pszID) PURE;
  381. STDMETHOD(Flush)(THIS) PURE;
  382. };
  383. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  384. // Detection DLL
  385. // Returns from DetectVersion
  386. #define DET_NOTINSTALLED 0
  387. #define DET_INSTALLED 1
  388. #define DET_NEWVERSIONINSTALLED 2
  389. #define DET_OLDVERSIONINSTALLED 3
  390. // Function prototype
  391. typedef struct
  392. {
  393. DWORD dwSize;
  394. LPDWORD pdwInstalledVer;
  395. LPDWORD pdwInstalledBuild;
  396. LPSTR pszGUID;
  397. LPSTR pszLocale;
  398. DWORD dwAskVer;
  399. DWORD dwAskBuild;
  400. ICifFile *pCifFile;
  401. ICifComponent *pCifComp;
  402. } DETECTION_STRUCT;
  403. typedef DWORD (WINAPI *DETECTVERSION)(DETECTION_STRUCT *pDetectionStruct);
  404. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  405. DEFINE_GUID(IID_IInstallEngine2,0x6E449689L,0xC509,0x11CF,0xAA,0xFA,0x00,0xAA,0x00,0xB6,0x01,0x5C);
  406. #undef INTERFACE
  407. #define INTERFACE IInstallEngine2
  408. DECLARE_INTERFACE_(IInstallEngine2 , IInstallEngine)
  409. {
  410. STDMETHOD(SetLocalCif)(THIS_ LPCSTR pszCif) PURE;
  411. STDMETHOD(GetICifFile)(THIS_ ICifFile **picif) PURE;
  412. };
  413. HRESULT WINAPI GetICifFileFromFile(ICifFile **, LPCSTR pszFile);
  414. HRESULT WINAPI GetICifRWFileFromFile(ICifRWFile **, LPCSTR pszFile);
  415. #ifdef __cplusplus
  416. }
  417. #endif
  418. #define _INSENG_H_
  419. #endif //