// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //+--------------------------------------------------------------------------- // // Microsoft Windows // File: fusion.idl // // Contents: Fusion Interfaces // // Classes: // // Functions: // // //---------------------------------------------------------------------------- cpp_quote("//=--------------------------------------------------------------------------=") cpp_quote("// fusion.h") cpp_quote("//=--------------------------------------------------------------------------=") cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.") cpp_quote("//") cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF") cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO") cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A") cpp_quote("// PARTICULAR PURPOSE.") cpp_quote("//=--------------------------------------------------------------------------=") cpp_quote("") cpp_quote("#ifdef _MSC_VER") cpp_quote("#pragma comment(lib,\"uuid.lib\")") cpp_quote("#endif") cpp_quote("") cpp_quote("//---------------------------------------------------------------------------=") cpp_quote("// Fusion Interfaces.") cpp_quote("") import "objidl.idl"; cpp_quote("#ifdef _MSC_VER") cpp_quote("#pragma once") cpp_quote("#endif") interface IAssemblyCache; interface IAssemblyCacheItem; interface IAssemblyName; interface IAssemblyEnum; typedef enum { ASM_CACHE_ZAP = 0x1, ASM_CACHE_GAC = 0x2, ASM_CACHE_DOWNLOAD = 0x4 } ASM_CACHE_FLAGS; /////////////////////////////////////////////////////////////////////////////// // // IAssemblyCache // /////////////////////////////////////////////////////////////////////////////// [ local, object, uuid(e707dcde-d1cd-11d2-bab9-00c04f8eceae), pointer_default(unique) ] interface IAssemblyCache : IUnknown { cpp_quote("// {8cedc215-ac4b-488b-93c0-a50a49cb2fb8}") cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID, 0x8cedc215, 0xac4b, 0x488b, 0x93, 0xc0, 0xa5, 0x0a, 0x49, 0xcb, 0x2f, 0xb8);") cpp_quote("") cpp_quote("// {b02f9d65-fb77-4f7a-afa5-b391309f11c9}") cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_FILEPATH_GUID, 0xb02f9d65, 0xfb77, 0x4f7a, 0xaf, 0xa5, 0xb3, 0x91, 0x30, 0x9f, 0x11, 0xc9);") cpp_quote("") cpp_quote("// {2ec93463-b0c3-45e1-8364-327e96aea856}") cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_OPAQUE_STRING_GUID, 0x2ec93463, 0xb0c3, 0x45e1, 0x83, 0x64, 0x32, 0x7e, 0x96, 0xae, 0xa8, 0x56);") cpp_quote(" // {25df0fc1-7f97-4070-add7-4b13bbfd7cb8} // this GUID cannot be used for installing into GAC.") cpp_quote("DEFINE_GUID(FUSION_REFCOUNT_MSI_GUID, 0x25df0fc1, 0x7f97, 0x4070, 0xad, 0xd7, 0x4b, 0x13, 0xbb, 0xfd, 0x7c, 0xb8); ") typedef struct _FUSION_INSTALL_REFERENCE_ { DWORD cbSize; DWORD dwFlags; GUID guidScheme; // contains one of the pre-defined guids. LPCWSTR szIdentifier; // unique identifier for app installing this assembly. LPCWSTR szNonCannonicalData; // data is description; relevent to the guid above } FUSION_INSTALL_REFERENCE, *LPFUSION_INSTALL_REFERENCE; typedef const FUSION_INSTALL_REFERENCE *LPCFUSION_INSTALL_REFERENCE; typedef struct _ASSEMBLY_INFO { ULONG cbAssemblyInfo; // size of this structure for future expansion DWORD dwAssemblyFlags; ULARGE_INTEGER uliAssemblySizeInKB; LPWSTR pszCurrentAssemblyPathBuf; ULONG cchBuf; // size of path buf. } ASSEMBLY_INFO; cpp_quote("#define IASSEMBLYCACHE_INSTALL_FLAG_REFRESH (0x00000001)") cpp_quote("#define IASSEMBLYCACHE_INSTALL_FLAG_FORCE_REFRESH (0x00000002)") cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED (1)") cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_STILL_IN_USE (2)") cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED (3)") cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_DELETE_PENDING (4)") cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_HAS_INSTALL_REFERENCES (5)") cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_REFERENCE_NOT_FOUND (6)") cpp_quote("#define QUERYASMINFO_FLAG_VALIDATE (0x00000001)") cpp_quote("#define QUERYASMINFO_FLAG_GETSIZE (0x00000002)") // these flags are for dwAssemblyFlags field in struct _ASSEMBLY_INFO cpp_quote("#define ASSEMBLYINFO_FLAG_INSTALLED (0x00000001)") cpp_quote("#define ASSEMBLYINFO_FLAG_PAYLOADRESIDENT (0x00000002)") HRESULT UninstallAssembly( [in] DWORD dwFlags, [in] LPCWSTR pszAssemblyName, [in] LPCFUSION_INSTALL_REFERENCE pRefData, [out, optional] ULONG *pulDisposition ); HRESULT QueryAssemblyInfo( [in] DWORD dwFlags, [in] LPCWSTR pszAssemblyName, [in, out] ASSEMBLY_INFO *pAsmInfo ); HRESULT CreateAssemblyCacheItem( [in] DWORD dwFlags, [in] PVOID pvReserved, [out] IAssemblyCacheItem **ppAsmItem, [in, optional] LPCWSTR pszAssemblyName // uncanonicalized, comma separated name=value pairs. ); HRESULT CreateAssemblyScavenger ( [out] IUnknown **ppUnkReserved ); HRESULT InstallAssembly( // if you use this, fusion will do the streaming & commit. [in] DWORD dwFlags, [in] LPCWSTR pszManifestFilePath, [in] LPCFUSION_INSTALL_REFERENCE pRefData ); } /////////////////////////////////////////////////////////////////////////////// // // IAssemblyCacheItem // /////////////////////////////////////////////////////////////////////////////// [ local, object, uuid(9e3aaeb4-d1cd-11d2-bab9-00c04f8eceae), pointer_default(unique) ] interface IAssemblyCacheItem : IUnknown { cpp_quote("#define STREAM_FORMAT_COMPLIB_MODULE 0") cpp_quote("#define STREAM_FORMAT_COMPLIB_MANIFEST 1") cpp_quote("#define STREAM_FORMAT_WIN32_MODULE 2") cpp_quote("#define STREAM_FORMAT_WIN32_MANIFEST 4") cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_FLAG_REFRESH (0x00000001)") cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_FLAG_FORCE_REFRESH (0x00000002)") cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_INSTALLED (1)") // first time install cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_REFRESHED (2)") // overwrite, if existing cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_ALREADY_INSTALLED (3)") // existing, HRESULT CreateStream( [in] DWORD dwFlags, // For general API flags [in] LPCWSTR pszStreamName, // Name of the stream to be passed in [in] DWORD dwFormat, // format of the file to be streamed in. [in] DWORD dwFormatFlags, // format-specific flags [out] IStream **ppIStream, [in, optional] ULARGE_INTEGER *puliMaxSize // Max size of the Stream. ); HRESULT Commit ( [in] DWORD dwFlags, // For general API flags like IASSEMBLYCACHEITEM _COMMIT_FLAG_REFRESH [out, optional] ULONG *pulDisposition ); HRESULT AbortItem(); // If you have created IAssemblyCacheItem and don't plan to use it, its good idea to call AbortItem before releasing it. } /////////////////////////////////////////////////////////////////////////////// // // IAssemblyName // /////////////////////////////////////////////////////////////////////////////// [ local, object, uuid(CD193BC0-B4BC-11d2-9833-00C04FC31D2E), pointer_default(unique) ] interface IAssemblyName: IUnknown { typedef [unique] IAssemblyName *LPASSEMBLYNAME; typedef enum { CANOF_PARSE_DISPLAY_NAME = 0x1, CANOF_SET_DEFAULT_VALUES = 0x2 } CREATE_ASM_NAME_OBJ_FLAGS; typedef enum { ASM_NAME_PUBLIC_KEY = 0, ASM_NAME_PUBLIC_KEY_TOKEN, ASM_NAME_HASH_VALUE, ASM_NAME_NAME, ASM_NAME_MAJOR_VERSION, ASM_NAME_MINOR_VERSION, ASM_NAME_BUILD_NUMBER, ASM_NAME_REVISION_NUMBER, ASM_NAME_CULTURE, ASM_NAME_PROCESSOR_ID_ARRAY, ASM_NAME_OSINFO_ARRAY, ASM_NAME_HASH_ALGID, ASM_NAME_ALIAS, ASM_NAME_CODEBASE_URL, ASM_NAME_CODEBASE_LASTMOD, ASM_NAME_NULL_PUBLIC_KEY, ASM_NAME_NULL_PUBLIC_KEY_TOKEN, ASM_NAME_CUSTOM, ASM_NAME_NULL_CUSTOM, ASM_NAME_MVID, ASM_NAME_MAX_PARAMS } ASM_NAME; typedef enum { ASM_DISPLAYF_VERSION = 0x1, ASM_DISPLAYF_CULTURE = 0x2, ASM_DISPLAYF_PUBLIC_KEY_TOKEN = 0x4, ASM_DISPLAYF_PUBLIC_KEY = 0x8, ASM_DISPLAYF_CUSTOM = 0x10, ASM_DISPLAYF_PROCESSORARCHITECTURE = 0x20, ASM_DISPLAYF_LANGUAGEID = 0x40 } ASM_DISPLAY_FLAGS; typedef enum { ASM_CMPF_NAME = 0x1, ASM_CMPF_MAJOR_VERSION = 0x2, ASM_CMPF_MINOR_VERSION = 0x4, ASM_CMPF_BUILD_NUMBER = 0x8, ASM_CMPF_REVISION_NUMBER = 0x10, ASM_CMPF_PUBLIC_KEY_TOKEN = 0x20, ASM_CMPF_CULTURE = 0x40, ASM_CMPF_CUSTOM = 0x80, ASM_CMPF_ALL = ASM_CMPF_NAME | ASM_CMPF_MAJOR_VERSION | ASM_CMPF_MINOR_VERSION | ASM_CMPF_REVISION_NUMBER | ASM_CMPF_BUILD_NUMBER | ASM_CMPF_PUBLIC_KEY_TOKEN | ASM_CMPF_CULTURE | ASM_CMPF_CUSTOM, // For strongly named assemblies, ASM_CMPF_DEFAULT==ASM_CMPF_ALL. // For simply named assemblies, this is also true, however, when // performing IAssemblyName::IsEqual, the build number/revision // number will be removed from the comparision. ASM_CMPF_DEFAULT = 0x100 } ASM_CMP_FLAGS; HRESULT SetProperty( [in] DWORD PropertyId, [in] LPVOID pvProperty, [in] DWORD cbProperty); HRESULT GetProperty( [in] DWORD PropertyId, [out] LPVOID pvProperty, [in, out] LPDWORD pcbProperty); HRESULT Finalize(); HRESULT GetDisplayName( [out] LPOLESTR szDisplayName, [in, out] LPDWORD pccDisplayName, [in] DWORD dwDisplayFlags); HRESULT BindToObject( [in] REFIID refIID, [in] IUnknown *pUnkSink, [in] IUnknown *pUnkContext, [in] LPCOLESTR szCodeBase, [in] LONGLONG llFlags, [in] LPVOID pvReserved, [in] DWORD cbReserved, [out] LPVOID *ppv); HRESULT GetName( [in, out] LPDWORD lpcwBuffer, [out] WCHAR *pwzName); HRESULT GetVersion( [out] LPDWORD pdwVersionHi, [out] LPDWORD pdwVersionLow); HRESULT IsEqual( [in] IAssemblyName *pName, [in] DWORD dwCmpFlags); HRESULT Clone( [out] IAssemblyName **pName); } /////////////////////////////////////////////////////////////////////////////// // // IAssemblyEnum // /////////////////////////////////////////////////////////////////////////////// [ local, object, uuid(21b8916c-f28e-11d2-a473-00c04f8ef448), pointer_default(unique) ] interface IAssemblyEnum : IUnknown { HRESULT GetNextAssembly ( [in] LPVOID pvReserved, [out] IAssemblyName **ppName, [in] DWORD dwFlags ); HRESULT Reset(void); HRESULT Clone ( [out] IAssemblyEnum **ppEnum ); } /////////////////////////////////////////////////////////////////////////////// // // IInstallReferenceItem // /////////////////////////////////////////////////////////////////////////////// [ local, object, uuid(582dac66-e678-449f-aba6-6faaec8a9394), pointer_default(unique) ] interface IInstallReferenceItem : IUnknown { HRESULT GetReference ( [out] LPFUSION_INSTALL_REFERENCE *ppRefData, [in] DWORD dwFlags, [in] LPVOID pvReserved ); } /////////////////////////////////////////////////////////////////////////////// // // IInstallReferenceEnum // /////////////////////////////////////////////////////////////////////////////// [ local, object, uuid(56b1a988-7c0c-4aa2-8639-c3eb5a90226f), pointer_default(unique) ] interface IInstallReferenceEnum : IUnknown { HRESULT GetNextInstallReferenceItem ( [out] IInstallReferenceItem **ppRefItem, [in] DWORD dwFlags, [in] LPVOID pvReserved ); } #pragma midl_echo("STDAPI CreateInstallReferenceEnum(IInstallReferenceEnum **ppRefEnum, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved); ") #pragma midl_echo("STDAPI CreateAssemblyEnum(IAssemblyEnum **pEnum, IUnknown *pUnkReserved, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved); ") #pragma midl_echo("STDAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved); ") #pragma midl_echo("STDAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved); ") #pragma midl_echo("STDAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, PDWORD pcchPath); ")