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.

917 lines
27 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1999.
  5. //
  6. // File: fusion.idl
  7. //
  8. // Contents: Fusion Interfaces
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. //
  15. //----------------------------------------------------------------------------
  16. cpp_quote("//=--------------------------------------------------------------------------=")
  17. cpp_quote("// fusion.h")
  18. cpp_quote("//=--------------------------------------------------------------------------=")
  19. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.")
  20. cpp_quote("//")
  21. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  22. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  23. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  24. cpp_quote("// PARTICULAR PURPOSE.")
  25. cpp_quote("//=--------------------------------------------------------------------------=")
  26. cpp_quote("")
  27. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  28. cpp_quote("")
  29. cpp_quote("//---------------------------------------------------------------------------=")
  30. cpp_quote("// Fusion Interfaces.")
  31. cpp_quote("")
  32. import "objidl.idl";
  33. import "oleidl.idl";
  34. cpp_quote("#define STREAM_FORMAT_COMPLIB_MODULE 0")
  35. cpp_quote("#define STREAM_FORMAT_COMPLIB_MANIFEST 1")
  36. cpp_quote("#define STREAM_FORMAT_WIN32_MODULE 2")
  37. cpp_quote("#define STREAM_FORMAT_WIN32_MANIFEST 4")
  38. interface IAssemblyName;
  39. interface IApplicationContext;
  40. interface IAssembly;
  41. interface IAssemblyBindSink;
  42. interface IAssemblyBinding;
  43. interface IAssemblyManifestImport;
  44. interface IAssemblyModuleImport;
  45. interface IAssemblyCacheItem;
  46. interface IAssemblyScavenger;
  47. interface IAssemblyCache;
  48. interface IHistoryAssembly;
  49. interface IHistoryReader;
  50. interface IMetaDataAssemblyImportControl;
  51. interface IFusionLoadContext;
  52. cpp_quote("EXTERN_C const IID IID_IAssemblyName; ")
  53. cpp_quote("EXTERN_C const IID IID_IApplicationContext; ")
  54. cpp_quote("EXTERN_C const IID IID_IAssembly; ")
  55. cpp_quote("EXTERN_C const IID IID_IAssemblyBindSink; ")
  56. cpp_quote("EXTERN_C const IID IID_IAssemblyBinding; ")
  57. cpp_quote("EXTERN_C const IID IID_IAssemblyManifestImport;")
  58. cpp_quote("EXTERN_C const IID IID_IAssemblyModuleImport; ")
  59. cpp_quote("EXTERN_C const IID IID_IAssemblyCacheItem; ")
  60. cpp_quote("EXTERN_C const IID IID_IAssemblyScavenger; ")
  61. cpp_quote("EXTERN_C const IID IID_IAssemblyCache; ")
  62. cpp_quote("EXTERN_C const IID IID_IHistoryAssembly; ")
  63. cpp_quote("EXTERN_C const IID IID_IHistoryReader; ")
  64. cpp_quote("EXTERN_C const IID IID_IMetaDataAssemblyImportControl; ")
  65. cpp_quote("EXTERN_C const IID IID_IFusionLoadContext; ")
  66. cpp_quote("#ifndef _LPFUSION_DEFINED")
  67. cpp_quote("#define _LPFUSION_DEFINED")
  68. cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_FLAG_REFRESH (0x00000001)")
  69. cpp_quote("#define QUERYASMINFO_FLAG_VALIDATE (0x1)")
  70. // these flags are for dwAssemblyFlags field in struct _ASSEMBLY_INFO
  71. cpp_quote("#define ASSEMBLYINFO_FLAG_INSTALLED (0x00000001)")
  72. cpp_quote("#define ASSEMBLYINFO_FLAG_PAYLOADRESIDENT (0x00000002)")
  73. typedef struct _ASSEMBLY_INFO
  74. {
  75. ULONG cbAssemblyInfo; // size of this structure for future expansion
  76. DWORD dwAssemblyFlags;
  77. ULARGE_INTEGER uliAssemblySizeInKB;
  78. LPWSTR pszCurrentAssemblyPathBuf;
  79. ULONG cchBuf; // size of path buf.
  80. } ASSEMBLY_INFO;
  81. cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED (1)")
  82. cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_STILL_IN_USE (2)")
  83. cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED (3)")
  84. cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_DELETE_PENDING (4)")
  85. cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_INSTALLED (1)") // first time install
  86. cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_REFRESHED (2)") // overwrite, if existing
  87. cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_ALREADY_INSTALLED (3)") // existing,
  88. cpp_quote("// {8cedc215-ac4b-488b-93c0-a50a49cb2fb8}")
  89. cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID, 0x8cedc215, 0xac4b, 0x488b, 0x93, 0xc0, 0xa5, 0x0a, 0x49, 0xcb, 0x2f, 0xb8);")
  90. cpp_quote("")
  91. cpp_quote("// {b02f9d65-fb77-4f7a-afa5-b391309f11c9}")
  92. cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_FILEPATH_GUID, 0xb02f9d65, 0xfb77, 0x4f7a, 0xaf, 0xa5, 0xb3, 0x91, 0x30, 0x9f, 0x11, 0xc9);")
  93. cpp_quote("")
  94. cpp_quote("// {2ec93463-b0c3-45e1-8364-327e96aea856}")
  95. cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_OPAQUE_STRING_GUID, 0x2ec93463, 0xb0c3, 0x45e1, 0x83, 0x64, 0x32, 0x7e, 0x96, 0xae, 0xa8, 0x56);")
  96. typedef struct _FUSION_INSTALL_REFERENCE_
  97. {
  98. DWORD cbSize;
  99. DWORD dwFlags;
  100. GUID guidScheme; // contains one of the pre-defined guids.
  101. LPCWSTR szIdentifier; // unique identifier for app installing this assembly.
  102. LPCWSTR szNonCannonicalData; // data is description; relevent to the guid above
  103. } FUSION_INSTALL_REFERENCE, *LPFUSION_INSTALL_REFERENCE;
  104. typedef const struct _FUSION_INSTALL_REFERENCE_ *LPCFUSION_INSTALL_REFERENCE;
  105. ///////////////////////////////////////////////////////////////////////////////
  106. //
  107. // IAssemblyName
  108. //
  109. ///////////////////////////////////////////////////////////////////////////////
  110. [
  111. local,
  112. object,
  113. uuid(CD193BC0-B4BC-11d2-9833-00C04FC31D2E),
  114. pointer_default(unique)
  115. ]
  116. interface IAssemblyName: IUnknown
  117. {
  118. typedef [unique] IAssemblyName *LPASSEMBLYNAME;
  119. typedef enum
  120. {
  121. ASM_NAME_PUBLIC_KEY = 0,
  122. ASM_NAME_PUBLIC_KEY_TOKEN,
  123. ASM_NAME_HASH_VALUE,
  124. ASM_NAME_NAME,
  125. ASM_NAME_MAJOR_VERSION,
  126. ASM_NAME_MINOR_VERSION,
  127. ASM_NAME_BUILD_NUMBER,
  128. ASM_NAME_REVISION_NUMBER,
  129. ASM_NAME_CULTURE,
  130. ASM_NAME_PROCESSOR_ID_ARRAY,
  131. ASM_NAME_OSINFO_ARRAY,
  132. ASM_NAME_HASH_ALGID,
  133. ASM_NAME_ALIAS,
  134. ASM_NAME_CODEBASE_URL,
  135. ASM_NAME_CODEBASE_LASTMOD,
  136. ASM_NAME_NULL_PUBLIC_KEY,
  137. ASM_NAME_NULL_PUBLIC_KEY_TOKEN,
  138. ASM_NAME_CUSTOM,
  139. ASM_NAME_NULL_CUSTOM,
  140. ASM_NAME_MVID,
  141. ASM_NAME_MAX_PARAMS
  142. } ASM_NAME;
  143. typedef enum
  144. {
  145. ASM_BINDF_FORCE_CACHE_INSTALL = 0x1,
  146. ASM_BINDF_RFS_INTEGRITY_CHECK = 0x2,
  147. ASM_BINDF_RFS_MODULE_CHECK = 0x4,
  148. ASM_BINDF_BINPATH_PROBE_ONLY = 0x8,
  149. ASM_BINDF_SHARED_BINPATH_HINT = 0x10,
  150. ASM_BINDF_PARENT_ASM_HINT = 0x20
  151. } ASM_BIND_FLAGS;
  152. typedef enum
  153. {
  154. ASM_DISPLAYF_VERSION = 0x1,
  155. ASM_DISPLAYF_CULTURE = 0x2,
  156. ASM_DISPLAYF_PUBLIC_KEY_TOKEN = 0x4,
  157. ASM_DISPLAYF_PUBLIC_KEY = 0x8,
  158. ASM_DISPLAYF_CUSTOM = 0x10,
  159. ASM_DISPLAYF_PROCESSORARCHITECTURE = 0x20,
  160. ASM_DISPLAYF_LANGUAGEID = 0x40
  161. } ASM_DISPLAY_FLAGS;
  162. typedef enum
  163. {
  164. ASM_CMPF_NAME = 0x1,
  165. ASM_CMPF_MAJOR_VERSION = 0x2,
  166. ASM_CMPF_MINOR_VERSION = 0x4,
  167. ASM_CMPF_BUILD_NUMBER = 0x8,
  168. ASM_CMPF_REVISION_NUMBER = 0x10,
  169. ASM_CMPF_PUBLIC_KEY_TOKEN = 0x20,
  170. ASM_CMPF_CULTURE = 0x40,
  171. ASM_CMPF_CUSTOM = 0x80,
  172. ASM_CMPF_ALL = ASM_CMPF_NAME | ASM_CMPF_MAJOR_VERSION | ASM_CMPF_MINOR_VERSION |
  173. ASM_CMPF_REVISION_NUMBER | ASM_CMPF_BUILD_NUMBER |
  174. ASM_CMPF_PUBLIC_KEY_TOKEN | ASM_CMPF_CULTURE | ASM_CMPF_CUSTOM,
  175. // For strongly named assemblies, ASM_CMPF_DEFAULT==ASM_CMPF_ALL.
  176. // For simply named assemblies, this is also true, however, when
  177. // performing IAssemblyName::IsEqual, the build number/revision
  178. // number will be removed from the comparision.
  179. ASM_CMPF_DEFAULT = 0x100
  180. } ASM_CMP_FLAGS;
  181. HRESULT SetProperty(
  182. [in] DWORD PropertyId,
  183. [in] LPVOID pvProperty,
  184. [in] DWORD cbProperty);
  185. HRESULT GetProperty(
  186. [in] DWORD PropertyId,
  187. [out] LPVOID pvProperty,
  188. [in, out] LPDWORD pcbProperty);
  189. HRESULT Finalize();
  190. HRESULT GetDisplayName(
  191. [out] LPOLESTR szDisplayName,
  192. [in, out] LPDWORD pccDisplayName,
  193. [in] DWORD dwDisplayFlags);
  194. HRESULT BindToObject(
  195. [in] REFIID refIID,
  196. [in] IAssemblyBindSink *pAsmBindSink,
  197. [in] IApplicationContext *pApplicationContext,
  198. [in] LPCOLESTR szCodeBase,
  199. [in] LONGLONG llFlags,
  200. [in] LPVOID pvReserved,
  201. [in] DWORD cbReserved,
  202. [out] LPVOID *ppv);
  203. HRESULT GetName(
  204. [in, out] LPDWORD lpcwBuffer,
  205. [out] WCHAR *pwzName);
  206. HRESULT GetVersion(
  207. [out] LPDWORD pdwVersionHi,
  208. [out] LPDWORD pdwVersionLow);
  209. HRESULT IsEqual(
  210. [in] IAssemblyName *pName,
  211. [in] DWORD dwCmpFlags);
  212. HRESULT Clone(
  213. [out] IAssemblyName **pName);
  214. }
  215. ///////////////////////////////////////////////////////////////////////////////
  216. //
  217. // IApplicationContext
  218. //
  219. ///////////////////////////////////////////////////////////////////////////////
  220. [
  221. local,
  222. object,
  223. uuid(7c23ff90-33af-11d3-95da-00a024a85b51),
  224. pointer_default(unique)
  225. ]
  226. interface IApplicationContext: IUnknown
  227. {
  228. cpp_quote("// App context configuration variables")
  229. cpp_quote("#define ACTAG_APP_BASE_URL L\"APPBASE\"")
  230. cpp_quote("#define ACTAG_MACHINE_CONFIG L\"MACHINE_CONFIG\"")
  231. cpp_quote("#define ACTAG_APP_PRIVATE_BINPATH L\"PRIVATE_BINPATH\"")
  232. cpp_quote("#define ACTAG_APP_SHARED_BINPATH L\"SHARED_BINPATH\"")
  233. cpp_quote("#define ACTAG_APP_SNAPSHOT_ID L\"SNAPSHOT_ID\"")
  234. cpp_quote("#define ACTAG_APP_CONFIG_FILE L\"APP_CONFIG_FILE\"")
  235. cpp_quote("#define ACTAG_APP_ID L\"APPLICATION_ID\"")
  236. cpp_quote("#define ACTAG_APP_SHADOW_COPY_DIRS L\"SHADOW_COPY_DIRS\"")
  237. cpp_quote("#define ACTAG_APP_DYNAMIC_BASE L\"DYNAMIC_BASE\"")
  238. cpp_quote("#define ACTAG_APP_CACHE_BASE L\"CACHE_BASE\"")
  239. cpp_quote("#define ACTAG_APP_NAME L\"APP_NAME\"")
  240. cpp_quote("#define ACTAG_DEV_PATH L\"DEV_PATH\"")
  241. cpp_quote("#define ACTAG_HOST_CONFIG_FILE L\"HOST_CONFIG\"")
  242. cpp_quote("#define ACTAG_SXS_ACTIVATION_CONTEXT L\"SXS_ACTIVATION_CONTEXT\"")
  243. cpp_quote("#define ACTAG_APP_CFG_LOCAL_FILEPATH L\"APP_CFG_LOCAL_FILEPATH\"")
  244. cpp_quote("// App context flag overrides")
  245. cpp_quote("#define ACTAG_FORCE_CACHE_INSTALL L\"FORCE_CACHE_INSTALL\"")
  246. cpp_quote("#define ACTAG_RFS_INTEGRITY_CHECK L\"RFS_INTEGRITY_CHECK\"")
  247. cpp_quote("#define ACTAG_RFS_MODULE_CHECK L\"RFS_MODULE_CHECK\"")
  248. cpp_quote("#define ACTAG_BINPATH_PROBE_ONLY L\"BINPATH_PROBE_ONLY\"")
  249. typedef [unique] IApplicationContext *LPAPPLICATIONCONTEXT;
  250. typedef enum
  251. {
  252. APP_CTX_FLAGS_INTERFACE = 0x1
  253. } APP_FLAGS;
  254. HRESULT SetContextNameObject(
  255. [in] LPASSEMBLYNAME pName);
  256. HRESULT GetContextNameObject(
  257. [out] LPASSEMBLYNAME * ppName);
  258. HRESULT Set(
  259. [in] LPCOLESTR szName,
  260. [in] LPVOID pvValue,
  261. [in] DWORD cbValue,
  262. [in] DWORD dwFlags);
  263. HRESULT Get(
  264. [in] LPCOLESTR szName,
  265. [out] LPVOID pvValue,
  266. [in, out] LPDWORD pcbValue,
  267. [in] DWORD dwFlags);
  268. HRESULT GetDynamicDirectory(
  269. [out] LPWSTR wzDynamicDir,
  270. [in, out] LPDWORD pdwSize);
  271. HRESULT GetAppCacheDirectory(
  272. [out] LPWSTR wzAppCacheDir,
  273. [in, out] LPDWORD pdwSize);
  274. HRESULT RegisterKnownAssembly(
  275. [in] IAssemblyName *pName,
  276. [in] LPCWSTR pwzAsmURL,
  277. [out] IAssembly **ppAsmOut);
  278. HRESULT PrefetchAppConfigFile();
  279. HRESULT SxsActivateContext(ULONG_PTR *lpCookie);
  280. HRESULT SxsDeactivateContext(ULONG_PTR ulCookie);
  281. }
  282. ///////////////////////////////////////////////////////////////////////////////
  283. //
  284. // IAssembly
  285. //
  286. ///////////////////////////////////////////////////////////////////////////////
  287. [
  288. local,
  289. object,
  290. uuid(ff08d7d4-04c2-11d3-94aa-00c04fc308ff),
  291. pointer_default(unique)
  292. ]
  293. interface IAssembly : IUnknown
  294. {
  295. typedef [unique] IAssembly *LPASSEMBLY;
  296. typedef enum {
  297. ASMLOC_UNKNOWN,
  298. ASMLOC_GAC,
  299. ASMLOC_DOWNLOAD_CACHE,
  300. ASMLOC_RUN_FROM_SOURCE
  301. } ASM_LOCATION;
  302. HRESULT GetAssemblyNameDef(
  303. [out] IAssemblyName **ppAssemblyName);
  304. HRESULT GetNextAssemblyNameRef(
  305. [in] DWORD nIndex,
  306. [out] IAssemblyName **ppAssemblyName);
  307. HRESULT GetNextAssemblyModule(
  308. [in] DWORD nIndex,
  309. [out] IAssemblyModuleImport **ppModImport);
  310. HRESULT GetModuleByName(
  311. [in] LPCOLESTR szModuleName,
  312. [out] IAssemblyModuleImport **ppModImport);
  313. HRESULT GetManifestModulePath(
  314. [out, size_is(*pccModulePath)] LPOLESTR szModulePath,
  315. [in, out] LPDWORD pccModulePath);
  316. HRESULT GetAssemblyPath(
  317. [out, size_is(*lpcwBuffer)] LPOLESTR pStr,
  318. [in, out] LPDWORD lpcwBuffer);
  319. HRESULT GetAssemblyLocation(
  320. [out] ASM_LOCATION *pAsmLocation);
  321. HRESULT GetFusionLoadContext(
  322. [out] IFusionLoadContext **ppLoadContext
  323. );
  324. }
  325. ///////////////////////////////////////////////////////////////////////////////
  326. //
  327. // IAssemblyBindSink
  328. //
  329. ///////////////////////////////////////////////////////////////////////////////
  330. [
  331. local,
  332. object,
  333. uuid(af0bc960-0b9a-11d3-95ca-00a024a85b51),
  334. pointer_default(unique)
  335. ]
  336. interface IAssemblyBindSink : IUnknown
  337. {
  338. typedef [unique] IAssemblyBindSink *LPASSEMBLY_BIND_SINK;
  339. typedef enum
  340. {
  341. ASM_NOTIFICATION_START,
  342. ASM_NOTIFICATION_PROGRESS,
  343. ASM_NOTIFICATION_SUSPEND,
  344. ASM_NOTIFICATION_ATTEMPT_NEXT_CODEBASE,
  345. ASM_NOTIFICATION_BIND_LOG,
  346. ASM_NOTIFICATION_DONE
  347. } ASM_NOTIFICATION;
  348. HRESULT OnProgress(
  349. [in] DWORD dwNotification,
  350. [in] HRESULT hrNotification,
  351. [in] LPCWSTR szNotification,
  352. [in] DWORD dwProgress,
  353. [in] DWORD dwProgressMax,
  354. [in] IUnknown *pUnk);
  355. }
  356. ///////////////////////////////////////////////////////////////////////////////
  357. //
  358. // IAssemblyBinding
  359. //
  360. ///////////////////////////////////////////////////////////////////////////////
  361. [
  362. local,
  363. object,
  364. uuid(cfe52a80-12bd-11d3-95ca-00a024a85b51),
  365. pointer_default(unique)
  366. ]
  367. interface IAssemblyBinding : IUnknown
  368. {
  369. typedef [unique] IAssemblyBinding *LPASSEMBLY_BINDINDING;
  370. HRESULT Control(
  371. [in] HRESULT hrControl);
  372. HRESULT DoDefaultUI(
  373. [in] HWND hWnd,
  374. [in] DWORD dwFlags);
  375. }
  376. ///////////////////////////////////////////////////////////////////////////////
  377. //
  378. // IFusionBindLog
  379. //
  380. ///////////////////////////////////////////////////////////////////////////////
  381. [
  382. local,
  383. object,
  384. uuid(67E9F87D-8B8A-4a90-9D3E-85ED5B2DCC83),
  385. pointer_default(unique)
  386. ]
  387. interface IFusionBindLog : IUnknown
  388. {
  389. HRESULT GetResultCode();
  390. HRESULT GetBindLog
  391. (
  392. [in] DWORD dwDetailLevel,
  393. [out] LPWSTR pwzDebugLog,
  394. [in, out] DWORD *pcbDebugLog
  395. );
  396. }
  397. ///////////////////////////////////////////////////////////////////////////////
  398. //
  399. // IAssemblyManifestImport
  400. //
  401. ///////////////////////////////////////////////////////////////////////////////
  402. [
  403. local,
  404. object,
  405. uuid( de9a68ba-0fa2-11d3-94aa-00c04fc308ff),
  406. pointer_default(unique)
  407. ]
  408. interface IAssemblyManifestImport: IUnknown
  409. {
  410. typedef [unique] IAssemblyManifestImport *LPASSEMBLY_MANIFEST_IMPORT;
  411. HRESULT GetAssemblyNameDef(
  412. [out] IAssemblyName **ppAssemblyName);
  413. HRESULT GetNextAssemblyNameRef(
  414. [in] DWORD nIndex,
  415. [out] IAssemblyName ** ppAssemblyName);
  416. HRESULT GetNextAssemblyModule(
  417. [in] DWORD nIndex,
  418. [out] IAssemblyModuleImport **ppImport);
  419. HRESULT GetModuleByName(
  420. [in] LPCOLESTR szModuleName,
  421. [out] IAssemblyModuleImport **ppModImport);
  422. HRESULT GetManifestModulePath(
  423. [out, size_is(*pccModulePath)] LPOLESTR szModulePath,
  424. [in, out] LPDWORD pccModulePath);
  425. }
  426. ///////////////////////////////////////////////////////////////////////////////
  427. //
  428. // IMetaDataAssemblyImportControl
  429. //
  430. ///////////////////////////////////////////////////////////////////////////////
  431. [
  432. local,
  433. object,
  434. uuid(cc8529d9-f336-471b-b60a-c7c8ee9b8492),
  435. pointer_default(unique)
  436. ]
  437. interface IMetaDataAssemblyImportControl : IUnknown
  438. {
  439. HRESULT ReleaseMetaDataAssemblyImport(
  440. [out] IUnknown **ppUnk
  441. );
  442. }
  443. ///////////////////////////////////////////////////////////////////////////////
  444. //
  445. // IAssemblyModuleImport
  446. //
  447. ///////////////////////////////////////////////////////////////////////////////
  448. [
  449. local,
  450. object,
  451. uuid(da0cd4b0-1117-11d3-95ca-00a024a85b51),
  452. pointer_default(unique)
  453. ]
  454. interface IAssemblyModuleImport : IStream
  455. {
  456. typedef [unique] IAssemblyModuleImport *LPASSEMBLY_MODULE_IMPORT;
  457. HRESULT GetModuleName(
  458. [out, size_is(*pccModuleName)] LPOLESTR szModuleName,
  459. [in, out] LPDWORD pccModuleName);
  460. HRESULT GetHashAlgId(
  461. [out] LPDWORD pdwHashAlgId);
  462. HRESULT GetHashValue(
  463. [out, size_is(*pcbHashValue)] BYTE *pbHashValue,
  464. [in, out] LPDWORD pcbHashValue);
  465. HRESULT GetFlags(
  466. [out] LPDWORD pdwFlags);
  467. HRESULT GetModulePath(
  468. [out, size_is(*pccModulePath)] LPOLESTR szModulePath,
  469. [in, out] LPDWORD pccModulePath);
  470. BOOL IsAvailable();
  471. HRESULT BindToObject(
  472. [in] IAssemblyBindSink *pBindSink,
  473. [in] IApplicationContext *pAppCtx,
  474. [in] LONGLONG llFlags,
  475. [out] LPVOID *ppv);
  476. }
  477. ///////////////////////////////////////////////////////////////////////////////
  478. //
  479. // IAssemblyCacheItem
  480. //
  481. ///////////////////////////////////////////////////////////////////////////////
  482. [
  483. local,
  484. object,
  485. uuid(9e3aaeb4-d1cd-11d2-bab9-00c04f8eceae),
  486. pointer_default(unique)
  487. ]
  488. interface IAssemblyCacheItem : IUnknown
  489. {
  490. HRESULT CreateStream(
  491. [in] DWORD dwFlags, // For general API flags
  492. [in] LPCWSTR pszStreamName, // Name of the stream to be passed in
  493. [in] DWORD dwFormat, // format of the file to be streamed in.
  494. [in] DWORD dwFormatFlags, // format-specific flags
  495. [out] IStream **ppIStream,
  496. [in, optional] ULARGE_INTEGER *puliMaxSize // Max size of the Stream.
  497. );
  498. HRESULT Commit
  499. (
  500. [in] DWORD dwFlags, // For general API flags like IASSEMBLYCACHEITEM _COMMIT_FLAG_REFRESH
  501. [out, optional] ULONG *pulDisposition
  502. );
  503. HRESULT AbortItem(); // If you have created IAssemblyCacheItem and don't plan to use it, its good idea to call AbortItem before releasing it.
  504. }
  505. ///////////////////////////////////////////////////////////////////////////////
  506. //
  507. // IAssemblyEnum
  508. //
  509. ///////////////////////////////////////////////////////////////////////////////
  510. [
  511. local,
  512. object,
  513. uuid(21b8916c-f28e-11d2-a473-00c04f8ef448),
  514. pointer_default(unique)
  515. ]
  516. interface IAssemblyEnum : IUnknown
  517. {
  518. HRESULT GetNextAssembly
  519. (
  520. [out] IApplicationContext **ppAppCtx,
  521. [out] IAssemblyName **ppName,
  522. [in] DWORD dwFlags
  523. );
  524. HRESULT Reset(void);
  525. HRESULT Clone
  526. (
  527. [out] IAssemblyEnum ** ppEnum
  528. );
  529. }
  530. ///////////////////////////////////////////////////////////////////////////////
  531. //
  532. // IAssemblyScavenger
  533. //
  534. ///////////////////////////////////////////////////////////////////////////////
  535. [
  536. local,
  537. object,
  538. uuid(21b8916c-f28e-11d2-a473-00ccff8ef448),
  539. pointer_default(unique)
  540. ]
  541. interface IAssemblyScavenger : IUnknown
  542. {
  543. HRESULT ScavengeAssemblyCache
  544. (
  545. );
  546. HRESULT GetCacheDiskQuotas
  547. (
  548. [out] DWORD *pdwZapQuotaInGAC,
  549. [out] DWORD *pdwDownloadQuotaAdmin,
  550. [out] DWORD *pdwDownloadQuotaUser
  551. );
  552. HRESULT SetCacheDiskQuotas
  553. (
  554. [in] DWORD dwZapQuotaInGAC,
  555. [in] DWORD dwDownloadQuotaAdmin,
  556. [in] DWORD dwDownloadQuotaUser
  557. );
  558. HRESULT GetCurrentCacheUsage
  559. (
  560. [out] DWORD *dwZapUsage,
  561. [out] DWORD *dwDownloadUsage
  562. );
  563. }
  564. ///////////////////////////////////////////////////////////////////////////////
  565. //
  566. // IAssemblyCache
  567. //
  568. ///////////////////////////////////////////////////////////////////////////////
  569. [
  570. local,
  571. object,
  572. uuid(e707dcde-d1cd-11d2-bab9-00c04f8eceae),
  573. pointer_default(unique)
  574. ]
  575. interface IAssemblyCache : IUnknown
  576. {
  577. HRESULT UninstallAssembly(
  578. [in] DWORD dwFlags,
  579. [in] LPCWSTR pszAssemblyName,
  580. [in] LPCFUSION_INSTALL_REFERENCE pRefData,
  581. [out, optional] ULONG *pulDisposition
  582. );
  583. HRESULT QueryAssemblyInfo(
  584. [in] DWORD dwFlags,
  585. [in] LPCWSTR pszAssemblyName,
  586. [in, out] ASSEMBLY_INFO *pAsmInfo
  587. );
  588. HRESULT CreateAssemblyCacheItem(
  589. [in] DWORD dwFlags,
  590. [in] PVOID pvReserved,
  591. [out] IAssemblyCacheItem **ppAsmItem,
  592. [in, optional] LPCWSTR pszAssemblyName // uncanonicalized, comma separted name=value pairs.
  593. );
  594. HRESULT CreateAssemblyScavenger
  595. (
  596. [out] IAssemblyScavenger **ppAsmScavenger
  597. );
  598. HRESULT InstallAssembly( // if you use this, fusion will do the streaming & commit.
  599. [in] DWORD dwFlags,
  600. [in] LPCWSTR pszManifestFilePath,
  601. [in] LPCFUSION_INSTALL_REFERENCE pRefData
  602. );
  603. }
  604. ///////////////////////////////////////////////////////////////////////////////
  605. //
  606. // IHistoryAssembly
  607. //
  608. ///////////////////////////////////////////////////////////////////////////////
  609. [
  610. local,
  611. object,
  612. uuid(e6096a07-e188-4a49-8d50-2a0172a0d205),
  613. pointer_default(unique)
  614. ]
  615. interface IHistoryAssembly : IUnknown
  616. {
  617. HRESULT GetAssemblyName
  618. (
  619. [out] LPWSTR wzAsmName,
  620. [in, out] DWORD *pdwSize
  621. );
  622. HRESULT GetPublicKeyToken
  623. (
  624. [out] LPWSTR wzPublicKeyToken,
  625. [in, out] DWORD *pdwSize
  626. );
  627. HRESULT GetCulture
  628. (
  629. [out] LPWSTR wzCulture,
  630. [in, out] DWORD *pdwSize
  631. );
  632. HRESULT GetReferenceVersion
  633. (
  634. [out] LPWSTR wzVerRef,
  635. [in, out] DWORD *pdwSize
  636. );
  637. HRESULT GetActivationDate
  638. (
  639. [out] LPWSTR wzActivationDate,
  640. [in, out] DWORD *pdwSize
  641. );
  642. HRESULT GetAppCfgVersion
  643. (
  644. [out] LPWSTR pwzVerAppCfg,
  645. [in, out] DWORD *pdwSize
  646. );
  647. HRESULT GetPublisherCfgVersion
  648. (
  649. [out] LPWSTR pwzVerPublisherCfg,
  650. [in, out] DWORD *pdwSize
  651. );
  652. HRESULT GetAdminCfgVersion
  653. (
  654. [out] LPWSTR pwzAdminCfg,
  655. [in, out] DWORD *pdwSize
  656. );
  657. }
  658. ///////////////////////////////////////////////////////////////////////////////
  659. //
  660. // IHistoryReader
  661. //
  662. ///////////////////////////////////////////////////////////////////////////////
  663. [
  664. local,
  665. object,
  666. uuid(1d23df4d-a1e2-4b8b-93d6-6ea3dc285a54),
  667. pointer_default(unique)
  668. ]
  669. interface IHistoryReader : IUnknown
  670. {
  671. HRESULT GetFilePath
  672. (
  673. [out] LPWSTR wzFilePath,
  674. [in, out] DWORD *pdwSize
  675. );
  676. HRESULT GetApplicationName
  677. (
  678. [out] LPWSTR wzAppName,
  679. [in, out] DWORD *pdwSize
  680. );
  681. HRESULT GetEXEModulePath
  682. (
  683. [out] LPWSTR wzExePath,
  684. [in, out] DWORD *pdwSize
  685. );
  686. HRESULT GetNumActivations
  687. (
  688. [out] DWORD *pdwNumActivations
  689. );
  690. HRESULT GetActivationDate
  691. (
  692. [in] DWORD dwIdx,
  693. [out] FILETIME *pftDate
  694. );
  695. HRESULT GetRunTimeVersion
  696. (
  697. [in] FILETIME *pftActivationDate,
  698. [out] LPWSTR wzRunTimeVersion,
  699. [in, out] DWORD *pdwSize
  700. );
  701. HRESULT GetNumAssemblies
  702. (
  703. [in] FILETIME *pftActivationDate,
  704. [out] DWORD *pdwNumAsms
  705. );
  706. HRESULT GetHistoryAssembly
  707. (
  708. [in] FILETIME *pftActivationDate,
  709. [in] DWORD dwIdx,
  710. [out] IHistoryAssembly **ppHistAsm
  711. );
  712. }
  713. typedef enum {
  714. CANOF_PARSE_DISPLAY_NAME = 0x1,
  715. CANOF_SET_DEFAULT_VALUES = 0x2
  716. } CREATE_ASM_NAME_OBJ_FLAGS;
  717. typedef enum
  718. {
  719. ASM_CACHE_ZAP = 0x1,
  720. ASM_CACHE_GAC = 0x2,
  721. ASM_CACHE_DOWNLOAD = 0x4
  722. } ASM_CACHE_FLAGS;
  723. ///////////////////////////////////////////////////////////////////////////////
  724. //
  725. // IFusionLoadContext
  726. //
  727. ///////////////////////////////////////////////////////////////////////////////
  728. typedef enum {
  729. LOADCTX_TYPE_DEFAULT,
  730. LOADCTX_TYPE_LOADFROM,
  731. } LOADCTX_TYPE;
  732. [
  733. local,
  734. object,
  735. uuid(022AB2BA-7367-49fc-A1C5-0E7CC037CAAB),
  736. pointer_default(unique)
  737. ]
  738. interface IFusionLoadContext : IUnknown
  739. {
  740. LOADCTX_TYPE GetContextType();
  741. }
  742. #pragma midl_echo("STDAPI CreateHistoryReader(LPCWSTR wzFilePath, IHistoryReader **ppHistReader);")
  743. #pragma midl_echo("STDAPI LookupHistoryAssembly(LPCWSTR pwzFilePath, FILETIME *pftActivationDate, LPCWSTR pwzAsmName, LPCWSTR pwzPublicKeyToken, LPCWSTR wzCulture, LPCWSTR pwzVerRef, IHistoryAssembly **pHistAsm);")
  744. #pragma midl_echo("STDAPI GetHistoryFileDirectory(LPWSTR wzDir, DWORD *pdwSize);")
  745. // Publically exported functions from fusion.dll
  746. #pragma midl_echo("STDAPI AddAssemblyToCacheW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow);")
  747. #pragma midl_echo("STDAPI AddAssemblyToCacheA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);")
  748. #pragma midl_echo("STDAPI RemoveAssemblyFromCacheW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow);")
  749. #pragma midl_echo("STDAPI RemoveAssemblyFromCacheA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);")
  750. #pragma midl_echo("STDAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved); ")
  751. #pragma midl_echo("STDAPI CreateApplicationContext(IAssemblyName *pName, LPAPPLICATIONCONTEXT *ppCtx); ")
  752. #pragma midl_echo("STDAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved); ")
  753. #pragma midl_echo("STDAPI CreateAssemblyEnum(IAssemblyEnum **pEnum, IApplicationContext *pAppCtx, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved); ")
  754. #pragma midl_echo("STDAPI SetSchemaVersion(DWORD dwNewMinorVersion, DWORD dwCacheId, BOOL fIsNameRes); ")
  755. #pragma midl_echo("HRESULT GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, PDWORD pcchPath); ")
  756. #pragma midl_echo("STDAPI PreBindAssembly(IApplicationContext *pAppCtx, IAssemblyName *pName, IAssembly *pAsmParent, IAssemblyName **ppNamePostPolicy, LPVOID pvReserved); ")
  757. // Flags for the shfusion.dll init routine
  758. typedef enum
  759. {
  760. SH_INIT_FOR_GLOBAL,
  761. SH_INIT_FOR_USER
  762. } SH_INIT_FLAGS;
  763. cpp_quote("#endif")