diff options
Diffstat (limited to 'src/inc')
-rw-r--r-- | src/inc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/inc/binderngen.idl | 1 | ||||
-rw-r--r-- | src/inc/clrprivbinderutil.h | 122 | ||||
-rw-r--r-- | src/inc/corcompile.h | 56 | ||||
-rw-r--r-- | src/inc/corhost.h | 3 | ||||
-rw-r--r-- | src/inc/corpriv.h | 155 | ||||
-rw-r--r-- | src/inc/fusion.idl | 283 | ||||
-rw-r--r-- | src/inc/fusionbind.h | 316 | ||||
-rw-r--r-- | src/inc/fusionpriv.idl | 954 | ||||
-rw-r--r-- | src/inc/fusionsink.h | 129 | ||||
-rw-r--r-- | src/inc/holder.h | 18 | ||||
-rw-r--r-- | src/inc/vptr_list.h | 3 | ||||
-rw-r--r-- | src/inc/zapper.h | 27 |
13 files changed, 0 insertions, 2068 deletions
diff --git a/src/inc/CMakeLists.txt b/src/inc/CMakeLists.txt index d38fa40773..40499b44ea 100644 --- a/src/inc/CMakeLists.txt +++ b/src/inc/CMakeLists.txt @@ -9,7 +9,6 @@ set( CORGUIDS_IDL_SOURCES ivalidator.idl ivehandler.idl gchost.idl - fusionpriv.idl mscorsvc.idl tlbimpexp.idl clrprivappxhosting.idl diff --git a/src/inc/binderngen.idl b/src/inc/binderngen.idl index d20cf93701..f3d41cd6a6 100644 --- a/src/inc/binderngen.idl +++ b/src/inc/binderngen.idl @@ -36,7 +36,6 @@ cpp_quote("#endif") // interface IAssemblyName defined in fusion.idl // interface IAssemblyEnum defined in fusion.idl -// interface IFusionBindLog defined in fusionpriv.idl // interface ICorSvcLogger defined in mscorsvc.idl interface IAssemblyLocation; diff --git a/src/inc/clrprivbinderutil.h b/src/inc/clrprivbinderutil.h index 129e90388e..1a645dccc0 100644 --- a/src/inc/clrprivbinderutil.h +++ b/src/inc/clrprivbinderutil.h @@ -11,9 +11,6 @@ #include "holder.h" #include "internalunknownimpl.h" -#ifdef FEATURE_FUSION -#include "fusion.h" -#endif #include "clrprivbinding.h" #include "slist.h" #ifdef FEATURE_COMINTEROP @@ -89,125 +86,6 @@ namespace CLRPrivBinderUtil } //===================================================================================================================== -#ifdef FEATURE_FUSION - class CLRPrivAssemblyBindResultWrapper : - public IUnknownCommon< - IBindResult, - IAssemblyLocation> - { - public: - //----------------------------------------------------------------------------------------------------------------- - CLRPrivAssemblyBindResultWrapper( - IAssemblyName *pIAssemblyName, - PCWSTR wzAssemblyPath, - IILFingerprintFactory *pILFingerprintFactory - ); - - //----------------------------------------------------------------------------------------------------------------- - ~CLRPrivAssemblyBindResultWrapper(); - - protected: - //================================================================================================================= - // IBindResult methods - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetAssemblyNameDef)( - /*out*/ IAssemblyName **ppIAssemblyNameDef); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetNextAssemblyModuleName)( - /*in*/ DWORD dwNIndex, - __inout_ecount(*pdwCCModuleName) LPWSTR pwzModuleName, - /*in, out, annotation("__inout")*/ LPDWORD pdwCCModuleName); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetAssemblyLocation)( - /*out*/ IAssemblyLocation **ppIAssemblyLocation); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetNativeImage)( - /*out*/ IBindResult **ppIBindResultNI, - /*out*/ BOOL *pfIBindResultNIProbed); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(SetNativeImage)( - /*in*/ IBindResult *pIBindResultNI, - /*out*/ IBindResult **ppIBindResultNIFinal); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(IsEqual)( - /*in*/ IUnknown *pIUnk); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetNextAssemblyNameRef)( - /*in*/ DWORD dwNIndex, - /*out*/ IAssemblyName **ppIAssemblyNameRef); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetNextDependentAssembly)( - /*in*/ DWORD dwNIndex, - /*out*/ IUnknown **ppIUnknownAssembly); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetAssemblyLocationOfILImage)( - /*out*/ IAssemblyLocation **ppAssemblyLocation); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetILFingerprint)( - /*out*/ IILFingerprint **ppFingerprint); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetSourceILTimestamp)( - /*out*/ FILETIME* pFileTime); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetSourceILSize)( - /*out*/ DWORD* pSize); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetNIInfo)( - /*out*/ INativeImageInstallInfo** pInfo); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetFlags)( - /*out*/ DWORD * pdwFlags); - - //================================================================================================================= - // IAssemblyLocation methods - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetLocationType)( - /*out*/DWORD *pdwLocationType); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetPath)( - __inout_ecount(*pdwccAssemblyPath) LPWSTR pwzAssemblyPath, - /*in, annotation("__inout")*/ LPDWORD pdwccAssemblyPath); - - //----------------------------------------------------------------------------------------------------------------- - STDMETHOD(GetHostID)( - /*out*/ UINT64 *puiHostID); - - private: - inline PCWSTR GetILAssemblyPath() - { LIMITED_METHOD_CONTRACT; return m_wzAssemblyPath; } - - NewArrayHolder<WCHAR> m_wzAssemblyPath; - IAssemblyName * m_pIAssemblyName; - - // Since m_bIBindResultNISet and m_pIBindResultNI are separate data, they both need - // to be treated as volatile, making sure to always fetch m_bIBindResultNISet first - // and only read m_pIBindResultNI if m_bIBindResultNISet is true. - Volatile<bool> m_bIBindResultNISet; - VolatilePtr<IBindResult> m_pIBindResultNI; - - IILFingerprint * m_pIILFingerprint; - ReleaseHolder<IILFingerprintFactory> m_pILFingerprintFactory; - - // Used as a leaf lock for publishing, such as m_pIBindResultNI. - Crst m_lock; - }; // class CLRPrivAssemblyBindResultWrapper -#endif // FEATURE_FUSION //================================================================================================================= // Used to create an identity-only ICLRPrivAssembly from an ICLRPrivBinder. This is currently used when diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index 9a8c6b0f8b..e2d3c05d82 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -32,11 +32,6 @@ #include <corhdr.h> #include <corinfo.h> #include <corjit.h> -#ifdef FEATURE_FUSION -#include <fusion.h> -#include <fusionpriv.h> -#include <binderngen.h> -#endif //FEATURE_FUSION #include <sstring.h> #include <shash.h> #include <daccess.h> @@ -1408,13 +1403,6 @@ class ICorCompilationDomain DWORD *cDependencies ) = 0; -#ifdef FEATURE_FUSION - // Use to retrieve the IBindContext to be used by the native binder. - // This is typically passed into InstallNativeAssembly. - virtual HRESULT GetIBindContext( - IBindContext **ppBindCtx - ) = 0; -#endif #ifdef CROSSGEN_COMPILE virtual HRESULT SetPlatformWinmdPaths( @@ -1493,34 +1481,6 @@ class ICorCompileInfo CORINFO_ASSEMBLY_HANDLE *pHandle ) = 0; -#ifdef FEATURE_FUSION - // Loads an assembly via fusion into the EE - // and returns a handle to it. - virtual HRESULT LoadAssemblyByName( - LPCWSTR wzName, - CORINFO_ASSEMBLY_HANDLE *pHandle - ) = 0; - - // Loads an assembly via ref into the EE - // and returns a handle to it. The last parameter - // optionally allows an IAssemblyName for the ref - // (pre-policy) to be returned - virtual HRESULT LoadAssemblyRef( - IMDInternalImport *pAssemblyImport, - mdAssemblyRef ref, - CORINFO_ASSEMBLY_HANDLE *pHandle, - IAssemblyName **refAssemblyName = NULL - ) = 0; - - // Loads an assembly via its IAssemblyName. This is - // used by NGEN createpdb when generating PDBs for AutoNGENd images (it reads the - // IAssemblyName from the AUX file). - virtual HRESULT LoadAssemblyByIAssemblyName( - IAssemblyName *pAssemblyName, - CORINFO_ASSEMBLY_HANDLE *pHandle - ) = 0; - -#endif //FEATURE_FUSION #ifdef FEATURE_COMINTEROP // Loads a WinRT typeref into the EE and returns @@ -1560,22 +1520,6 @@ class ICorCompileInfo CORINFO_MODULE_HANDLE module ) = 0; -#ifdef FEATURE_FUSION - enum GetAssemblyNameFlags - { - GANF_Default = 0, - GANF_Simple = 1, - }; - - // Returns the fusion name of an assembly - virtual HRESULT GetAssemblyName( - CORINFO_ASSEMBLY_HANDLE hAssembly, - DWORD dwFlags, - __out_ecount(*cchAssemblyName) - __out_z LPWSTR wzAssemblyName, - LPDWORD cchAssemblyName - ) = 0; -#endif //FEATURE_FUSION // Returns the dependency load setting for an assembly ref virtual HRESULT GetLoadHint( diff --git a/src/inc/corhost.h b/src/inc/corhost.h index 8c634a926b..ada1757514 100644 --- a/src/inc/corhost.h +++ b/src/inc/corhost.h @@ -28,9 +28,6 @@ #include "ivehandler.h" #include "ivalidator.h" -#ifdef FEATURE_FUSION -#include "fusion.h" -#endif #include "holder.h" #include "clrprivhosting.h" diff --git a/src/inc/corpriv.h b/src/inc/corpriv.h index 197c7793d9..c422351402 100644 --- a/src/inc/corpriv.h +++ b/src/inc/corpriv.h @@ -469,153 +469,6 @@ struct CORCOMPILE_VERSION_INFO; struct CORCOMPILE_DEPENDENCY; typedef GUID CORCOMPILE_NGEN_SIGNATURE; -#ifdef FEATURE_FUSION -//********************************************************************** -// Gets the dependancies of a native image. If these change, then -// the native image cannot be used. -// -// IMetaDataImport::GetAssemblyRefProps() can be used to obtain information about -// the mdAssemblyRefs. -//***************************************************************************** - -// {814C9E35-3F3F-4975-977A-371F0A878AC7} -EXTERN_GUID(IID_INativeImageDependency, 0x814c9e35, 0x3f3f, 0x4975, 0x97, 0x7a, 0x37, 0x1f, 0xa, 0x87, 0x8a, 0xc7); - -DECLARE_INTERFACE_(INativeImageDependency, IUnknown) -{ - // Get the referenced assembly - STDMETHOD (GetILAssemblyRef) ( - mdAssemblyRef * pAssemblyRef // [OUT] - ) PURE; - - // Get the post-policy assembly actually used - STDMETHOD (GetILAssemblyDef) ( - mdAssemblyRef * ppAssemblyDef, // [OUT] - CORCOMPILE_ASSEMBLY_SIGNATURE * pSign // [OUT] - ) PURE; - - // Get the native image corresponding to GetILAssemblyDef() IF - // there is a hard-bound (directly-referenced) native dependancy - // - // We do not need the configStrig because configStrings have to - // be an exact part. Any partial matches are factored out into GetConfigMask() - STDMETHOD (GetNativeAssemblyDef) ( - CORCOMPILE_NGEN_SIGNATURE * pNativeSign // [OUT] INVALID_NGEN_SIGNATURE if there is no hard-bound dependancy - ) PURE; - - // Get PEKIND of the referenced assembly - STDMETHOD (GetPEKind) ( - PEKIND * CorPEKind // [OUT] - ) PURE; - -}; // INativeImageDependency - -//***************************************************************************** -// -// Fusion uses IFusionNativeImageInfo to obtain (and cache) informaton -// about a native image being installed into the native image cache. -// This allows Fusion to bind directly to native images -// without requiring (expensively) binding to the IL assembly first. -// -// IMetaDataAssemblyImport can be queried for this interface -// -//***************************************************************************** -// {0EA273D0-B4DA-4008-A60D-8D6EFFDD6E91} -EXTERN_GUID(IID_INativeImageInstallInfo, 0xea273d0, 0xb4da, 0x4008, 0xa6, 0xd, 0x8d, 0x6e, 0xff, 0xdd, 0x6e, 0x91); - -DECLARE_INTERFACE_(INativeImageInstallInfo, IUnknown) -{ - // Signature of the ngen image - // This matches the argument type of INativeImageDependency::GetNativeAssemblyDef - - STDMETHOD (GetSignature) ( - CORCOMPILE_NGEN_SIGNATURE * pNgenSign // [OUT] - ) PURE; - - - // CLR timestamp, CPU, compile options, OS type and other attributes of the - // NI image. This can be used to verify that the NI image was built - // with the running CLR. - - STDMETHOD (GetVersionInfo) ( - CORCOMPILE_VERSION_INFO * pVersionInfo // [OUT] - ) PURE; - - - // Signature of the source IL assembly. This can be used to - // verify that the IL image matches a candidate ngen image. - // This matches the argument type of IAssemblyRuntimeSignature::CheckSignature - // - - STDMETHOD (GetILSignature) ( - CORCOMPILE_ASSEMBLY_SIGNATURE * pILSign // [OUT] - ) PURE; - - // A partial match is allowed for the current NativeImage to be valid - - STDMETHOD (GetConfigMask) ( - DWORD * pConfigMask // [OUT] - ) PURE; - - // - // Dependancy assemblies. The native image is only valid - // if the dependancies have not changed. - // - - STDMETHOD (EnumDependencies) ( - HCORENUM * phEnum, // [IN/OUT] - Pointer to the enum - INativeImageDependency *rDeps[], // [OUT] - ULONG cMax, // [IN] Max dependancies to enumerate in this iteration - DWORD * pdwCount // [OUT] - Number of dependancies actually enumerated - ) PURE; - - - // Retrieve a specific dependency by the ngen signature. - - STDMETHOD (GetDependency) ( - const CORCOMPILE_NGEN_SIGNATURE *pcngenSign, // [IN] ngenSig of dependency you want - CORCOMPILE_DEPENDENCY *pDep // [OUT] matching dependency - ) PURE; - -}; // INativeImageInstallInfo - -//***************************************************************************** -// -// Runtime callback made by Fusion into the CLR to determine if the NativeAssembly -// can be used. The pUnkBindSink argument of CAssemblyName::BindToObject() can -// be queried for this interface -// -//***************************************************************************** -// {065AA013-9BDC-447c-922F-FEE929908447} -EXTERN_GUID(IID_INativeImageEvaluate, 0x65aa013, 0x9bdc, 0x447c, 0x92, 0x2f, 0xfe, 0xe9, 0x29, 0x90, 0x84, 0x47); - -#ifdef _PREFAST_ -#pragma warning(push) -#pragma warning(disable:28718) -#endif //_PREFAST_ - -interface IAssembly; - -#ifdef _PREFAST_ -#pragma warning(pop) -#endif //_PREFAST_ - - -DECLARE_INTERFACE_(INativeImageEvaluate, IUnknown) -{ - // This will be called before the assemblies are actually loaded. - // - // Returns S_FALSE if the native-image cannot be used. - - STDMETHOD (Evaluate) ( - IAssembly *pILAssembly, // [IN] IL assembly in question - IAssembly *pNativeAssembly, // [IN] NGen image we are trying to use for pILAssembly - BYTE * pbCachedData, // [IN] Data cached when the native-image was generated - DWORD dwDataSize // [IN] Size of the pbCachedData buffer - ) PURE; -}; // INativeImageEvaluate - -#endif // FEATURE_FUSION //********************************************************************** // Internal versions of shim functions for use by the CLR. @@ -665,10 +518,6 @@ STDAPI GetRequestedRuntimeInfoInternal(LPCWSTR pExe, // and is shared by the desktop and coreclr's which have separate native binders. // Hence, this interface inherits a lot of "baggage." -#ifdef FEATURE_FUSION -interface IFusionBindLog; -interface IAssemblyName; -#endif // FEATURE_FUSION // A small shim around PEAssemblies/IBindResult that allow us to write Fusion/CLR-agnostic code @@ -683,10 +532,6 @@ class LoggableAssembly { public: virtual SString DisplayString() = 0; // Returns an unspecified representation suitable for injecting into log messages. -#ifdef FEATURE_FUSION - virtual IAssemblyName* FusionAssemblyName() = 0; // Can return NULL. Caller must NOT release result. - virtual IFusionBindLog* FusionBindLog() = 0; // Can return NULL. Caller must NOT release result. -#endif // FEATURE_FUSION }; diff --git a/src/inc/fusion.idl b/src/inc/fusion.idl index 317e690fe6..4056d168ba 100644 --- a/src/inc/fusion.idl +++ b/src/inc/fusion.idl @@ -37,16 +37,6 @@ interface IAssemblyCacheItem; interface IAssemblyName; interface IAssemblyEnum; -#ifdef FEATURE_FUSION -typedef enum -{ - ASM_CACHE_ZAP = 0x1, - ASM_CACHE_GAC = 0x2, - ASM_CACHE_DOWNLOAD = 0x4, - ASM_CACHE_ROOT = 0x8, //This is only meaningful on GetCachePath. - ASM_CACHE_ROOT_EX = 0x80 // Only valid when used with GetCachePath. -} ASM_CACHE_FLAGS; -#endif cpp_quote("#ifndef PEKIND_ENUM_DEFINED") cpp_quote("#define PEKIND_ENUM_DEFINED") @@ -71,160 +61,6 @@ typedef enum _tagAssemblyContentType AssemblyContentType_Invalid = 0xffffffff } AssemblyContentType; -#ifdef FEATURE_FUSION -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyCache -// -/////////////////////////////////////////////////////////////////////////////// - -cpp_quote("// {E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE}") -cpp_quote("EXTERN_GUID(IID_IAssemblyCache, 0xE707DCDE, 0xD1CD, 0x11D2, 0xBA, 0xB9, 0x00, 0xC0, 0x4F, 0x8E, 0xCE, 0xAE);") - -[ - local, - object, - uuid(e707dcde-d1cd-11d2-bab9-00c04f8eceae), - pointer_default(unique) -] -interface IAssemblyCache : IUnknown -{ - cpp_quote("// {8cedc215-ac4b-488b-93c0-a50a49cb2fb8}") - cpp_quote("EXTERN_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("EXTERN_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("EXTERN_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("EXTERN_GUID(FUSION_REFCOUNT_MSI_GUID, 0x25df0fc1, 0x7f97, 0x4070, 0xad, 0xd7, 0x4b, 0x13, 0xbb, 0xfd, 0x7c, 0xb8); ") - - cpp_quote(" // {d16d444c-56d8-11d5-882d-0080c847b195}") - cpp_quote("EXTERN_GUID(FUSION_REFCOUNT_OSINSTALL_GUID, 0xd16d444c, 0x56d8, 0x11d5, 0x88, 0x2d, 0x00, 0x80, 0xc8, 0x47, 0xb1, 0x95); ") - - 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 separted 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 -// -/////////////////////////////////////////////////////////////////////////////// - -cpp_quote("// {9e3aaeb4-d1cd-11d2-bab9-00c04f8eceae}") -cpp_quote("EXTERN_GUID(IID_IAssemblyCacheItem, 0x9e3aaeb4,0xd1cd,0x11d2,0xba,0xb9,0x00,0xc0,0x4f,0x8e,0xce,0xae);") - -[ - 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. - -} -#endif // FEATURE_FUSION /////////////////////////////////////////////////////////////////////////////// // @@ -401,125 +237,6 @@ interface IAssemblyName: IUnknown } -#ifdef FEATURE_FUSION -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyEnum -// -/////////////////////////////////////////////////////////////////////////////// -cpp_quote("// {21B8916C-F28E-11D2-A473-00C04F8EF448}") -cpp_quote("EXTERN_GUID(IID_IAssemblyEnum, 0x21B8916C,0xF28E,0x11D2,0xA4,0x73,0x00,0xC0,0x4F,0x8E,0xF4,0x48);") - -[ - 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 -// -/////////////////////////////////////////////////////////////////////////////// - -cpp_quote("// {582dac66-e678-449f-aba6-6faaec8a9394}") -cpp_quote("EXTERN_GUID(IID_IInstallReferenceItem, 0x582dac66,0xe678,0x449f,0xab,0xa6,0x6f,0xaa,0xec,0x8a,0x93,0x94);") - -[ - 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 -// -/////////////////////////////////////////////////////////////////////////////// - -cpp_quote("// {56b1a988-7c0c-4aa2-8639-c3eb5a90226f}") -cpp_quote("EXTERN_GUID(IID_IInstallReferenceEnum, 0x56b1a988,0x7c0c,0x4aa2,0x86,0x39,0xc3,0xeb,0x5a,0x90,0x22,0x6f);") - -[ - 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 - ); -} - -typedef enum _tagAssemblyComparisonResult -{ - ACR_Unknown, // Unknown - ACR_EquivalentFullMatch, // all fields match - ACR_EquivalentWeakNamed, // match based on weak-name, version numbers ignored - ACR_EquivalentFXUnified, // match based on FX-unification of version numbers - ACR_EquivalentUnified, // match based on legacy-unification of version numbers - ACR_NonEquivalentVersion, // all fields match except version field - ACR_NonEquivalent, // no match - - ACR_EquivalentPartialMatch, - ACR_EquivalentPartialWeakNamed, - ACR_EquivalentPartialUnified, - ACR_EquivalentPartialFXUnified, - ACR_NonEquivalentPartialVersion -} AssemblyComparisonResult; - - -#pragma midl_echo("STDAPI CreateAssemblyConfigCookie(LPCWSTR wzConfigFilePath, struct AssemblyConfig **ppAssemblyConfigOut);") -#pragma midl_echo("STDAPI DestroyAssemblyConfigCookie(struct AssemblyConfig *pAssemblyConfig);") - -#pragma midl_echo("STDAPI CompareAssemblyIdentity(LPCWSTR pwzAssemblyIdentity1, BOOL fUnified1, LPCWSTR pwzAssemblyIdentity2, BOOL fUnified2, BOOL *pfEquivalent, AssemblyComparisonResult *pResult); ") -#pragma midl_echo("STDAPI CompareAssemblyIdentityWithConfig(LPCWSTR pwzAssemblyIdentity1, BOOL fUnified1, LPCWSTR pwzAssemblyIdentity2, BOOL fUnified2, struct AssemblyConfig *pAssemblyConfig, BOOL *pfEquivalent, AssemblyComparisonResult *pResult); ") -#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); ") -#endif // FEATURE_FUSION #pragma midl_echo("STDAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved); ") -#ifdef FEATURE_FUSION -#pragma midl_echo("STDAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved); ") -#pragma midl_echo("STDAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, _Out_writes_to_(*pcchPath,*pcchPath) LPWSTR pwzCachePath, PDWORD pcchPath); ") -#pragma midl_echo("STDAPI GetAssemblyIdentityFromFile(LPCWSTR pwzFilePAth, REFIID riid, IUnknown **ppIdentity); ") -#pragma midl_echo("STDAPI ClearDownloadCache();") -#pragma midl_echo("typedef unsigned long MSIHANDLE;") -#pragma midl_echo("STDAPI SetMSIHandleForLogging(MSIHANDLE hMSIHandle);") -#endif // FEATURE_FUSION diff --git a/src/inc/fusionbind.h b/src/inc/fusionbind.h deleted file mode 100644 index 8628d3f9ce..0000000000 --- a/src/inc/fusionbind.h +++ /dev/null @@ -1,316 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -/*============================================================ -** -** Header: FusionBind.hpp -** -** Purpose: Implements FusionBind (loader domain) architecture -** -** -===========================================================*/ -#ifndef _FUSIONBIND_H -#define _FUSIONBIND_H - -#ifndef FEATURE_FUSION -#error FEATURE_FUSION is not enabled, please do not include fusionbind.h -#endif - -#include <fusion.h> -#include <fusionpriv.h> -#include "metadata.h" -#include "fusionsink.h" -#include "utilcode.h" -#include "loaderheap.h" -#include "fusionsetup.h" -#include "sstring.h" -#include "ex.h" -#ifdef PAL_STDCPP_COMPAT -#include <type_traits> -#else -#include "clr_std/type_traits" -#endif - -#include "binderngen.h" -#include "clrprivbinding.h" - -class FusionBind -{ -public: - - //**************************************************************************************** - // - - static HRESULT GetVersion(__out_ecount(*pdwVersion) LPWSTR pVersion, __inout DWORD* pdwVersion); - - - //**************************************************************************************** - // - // Creates a fusion context for the application domain. All ApplicationContext properties - // must be set in the AppDomain store prior to this call. Any changes or additions to the - // AppDomain store are ignored. - static HRESULT CreateFusionContext(LPCWSTR pzName, IApplicationContext** ppFusionContext); - - - //**************************************************************************************** - // - // Loads an environmental value into the fusion context - static HRESULT AddEnvironmentProperty(__in LPCWSTR variable, - __in LPCWSTR pProperty, - IApplicationContext* pFusionContext); - - //**************************************************************************************** - // - static HRESULT SetupFusionContext(LPCWSTR szAppBase, - LPCWSTR szPrivateBin, - IApplicationContext** ppFusionContext); - - // Starts remote load of an assembly. The thread is parked on - // an event waiting for fusion to report success or failure. - static HRESULT RemoteLoad(IApplicationContext * pFusionContext, - FusionSink* pSink, - IAssemblyName *pName, - IAssembly *pParentAssembly, - LPCWSTR pCodeBase, - IAssembly** ppIAssembly, - IHostAssembly** ppIHostAssembly, - IBindResult** ppNativeFusionAssembly, - BOOL fForIntrospectionOnly, - BOOL fSuppressSecurityChecks); - - static HRESULT RemoteLoadModule(IApplicationContext * pFusionContext, - IAssemblyModuleImport* pModule, - FusionSink *pSink, - IAssemblyModuleImport** pResult); - - static BOOL VerifyBindingStringW(LPCWSTR pwStr) { - WRAPPER_NO_CONTRACT; - if (wcschr(pwStr, '\\') || - wcschr(pwStr, '/') || - wcschr(pwStr, ':')) - return FALSE; - - return TRUE; - } - - static HRESULT VerifyBindingString(LPCSTR pName) { - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - INJECT_FAULT(return E_OUTOFMEMORY;); - } - CONTRACTL_END; - - DWORD dwStrLen = WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, pName, -1, NULL, NULL); - CQuickBytes qb; - LPWSTR pwStr = (LPWSTR) qb.AllocNoThrow(dwStrLen*sizeof(WCHAR)); - if (!pwStr) - return E_OUTOFMEMORY; - - if(!WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, pName, -1, pwStr, dwStrLen)) - return HRESULT_FROM_GetLastError(); - - if (VerifyBindingStringW(pwStr)) - return S_OK; - else - return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - } - - static void GetAssemblyManifestModulePath(IAssembly *pFusionAssembly, SString &result) - { - CONTRACTL - { - THROWS; - INJECT_FAULT(ThrowOutOfMemory()); - } - CONTRACTL_END; - - DWORD dwSize = 0; - LPWSTR buffer = NULL; - COUNT_T allocation = result.GetUnicodeAllocation(); - if (allocation > 0) { - // pass in the buffer if we got one - dwSize = allocation + 1; - buffer = result.OpenUnicodeBuffer(allocation); - } - HRESULT hr = pFusionAssembly->GetManifestModulePath(buffer, &dwSize); - if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) - { - if (buffer != NULL) - result.CloseBuffer(0); - buffer = result.OpenUnicodeBuffer(dwSize-1); - hr = pFusionAssembly->GetManifestModulePath(buffer, &dwSize); - } - if (buffer != NULL) - result.CloseBuffer((SUCCEEDED(hr) && dwSize >= 1) ? (dwSize-1) : 0); - IfFailThrow(hr); - } - - static SString& GetAssemblyNameDisplayName( - IAssemblyName *pName, - SString &result, - DWORD flags = 0 /* default */) - { - CONTRACTL - { - GC_NOTRIGGER; - THROWS; - INJECT_FAULT(ThrowOutOfMemory()); - } - CONTRACTL_END; - - DWORD dwSize = 0; - LPWSTR buffer = NULL; - COUNT_T allocation = result.GetUnicodeAllocation(); - if (allocation > 0) - { - // pass in the buffer if we got one - dwSize = allocation + 1; - buffer = result.OpenUnicodeBuffer(allocation); - } - - HRESULT hr = pName->GetDisplayName(buffer, &dwSize, flags); - if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) - { - if (buffer != NULL) - result.CloseBuffer(0); - buffer = result.OpenUnicodeBuffer(dwSize-1); - hr = pName->GetDisplayName(buffer, &dwSize, flags); - } - - if (buffer != NULL) - { - result.CloseBuffer((SUCCEEDED(hr) && dwSize >= 1) ? (dwSize-1) : 0); - } - - IfFailThrow(hr); - return result; - } - - static BOOL GetAssemblyNameStringProperty(IAssemblyName *pName, DWORD property, SString &result) - { - CONTRACTL - { - THROWS; - INJECT_FAULT(ThrowOutOfMemory()); - } - CONTRACTL_END; - - DWORD dwSize = 0; - LPWSTR buffer = NULL; - COUNT_T allocation = result.GetUnicodeAllocation(); - if (allocation > 0) { - // pass in the buffer if we got one - dwSize = (allocation + 1) * sizeof(WCHAR); - buffer = result.OpenUnicodeBuffer(allocation); - } - HRESULT hr = pName->GetProperty(property, (LPVOID)buffer, &dwSize); - if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) - { - if (buffer != NULL) - result.CloseBuffer(0); - buffer = result.OpenUnicodeBuffer(dwSize/sizeof(WCHAR) - 1); - hr = pName->GetProperty(property, (LPVOID)buffer, &dwSize); - } - if (buffer != NULL) - result.CloseBuffer((SUCCEEDED(hr) && dwSize >= sizeof(WCHAR)) ? (dwSize/sizeof(WCHAR)-1) : 0); - if (hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)) - { - return FALSE; - } - IfFailThrow(hr); - - return TRUE; - } - - static BOOL GetApplicationContextStringProperty(IApplicationContext *pContext, - LPCWSTR property, SString &result) - { - CONTRACTL - { - THROWS; - INJECT_FAULT(ThrowOutOfMemory()); - } - CONTRACTL_END; - - DWORD dwSize = 0; - LPWSTR buffer = NULL; - COUNT_T allocation = result.GetUnicodeAllocation(); - if (allocation > 0) { - // pass in the buffer if we got one - dwSize = (allocation + 1) * sizeof(WCHAR); - buffer = result.OpenUnicodeBuffer(allocation); - } - HRESULT hr = pContext->Get(property, (LPVOID)buffer, &dwSize, 0); - if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) - { - if (buffer != NULL) - result.CloseBuffer(0); - buffer = result.OpenUnicodeBuffer(dwSize/sizeof(WCHAR) - 1); - hr = pContext->Get(property, (LPVOID)buffer, &dwSize, 0); - } - if (buffer != NULL) - result.CloseBuffer((SUCCEEDED(hr) && dwSize >= sizeof(WCHAR)) ? (dwSize/sizeof(WCHAR)-1) : 0); - if (hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)) - { - return FALSE; - } - IfFailThrow(hr); - - return TRUE; - } - - static BOOL GetApplicationContextDWORDProperty(IApplicationContext *pContext, - LPCWSTR property, DWORD *result) - { - CONTRACTL - { - THROWS; - INJECT_FAULT(return E_OUTOFMEMORY;); - } - CONTRACTL_END; - - DWORD dwSize = sizeof(DWORD); - HRESULT hr = pContext->Get(property, result, &dwSize, 0); - if (hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)) - return FALSE; - - IfFailThrow(hr); - - return TRUE; - } - - static void SetApplicationContextStringProperty(IApplicationContext *pContext, LPCWSTR property, - SString &value) - { - CONTRACTL - { - THROWS; - INJECT_FAULT(ThrowOutOfMemory()); - } - CONTRACTL_END; - - IfFailThrow(pContext->Set(property, (void *) value.GetUnicode(), - (value.GetCount()+1)*sizeof(WCHAR), 0)); - } - - static void SetApplicationContextDWORDProperty(IApplicationContext *pContext, LPCWSTR property, - DWORD value) - { - CONTRACTL - { - THROWS; - INJECT_FAULT(ThrowOutOfMemory()); - } - CONTRACTL_END; - - IfFailThrow(pContext->Set(property, &value, sizeof(value), 0)); - } -}; - -#endif - diff --git a/src/inc/fusionpriv.idl b/src/inc/fusionpriv.idl deleted file mode 100644 index a988539f52..0000000000 --- a/src/inc/fusionpriv.idl +++ /dev/null @@ -1,954 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -//+--------------------------------------------------------------------------- -// -// Microsoft Windows -// File: fusionpriv.idl -// -// Contents: Fusion Interfaces -// -// Classes: -// -// Functions: -// -// -//---------------------------------------------------------------------------- -cpp_quote("//=--------------------------------------------------------------------------=") -cpp_quote("// fusionpriv.h") -cpp_quote("//=--------------------------------------------------------------------------=") -cpp_quote("// Licensed to the .NET Foundation under one or more agreements.") -cpp_quote("// The .NET Foundation licenses this file to you under the MIT license.") -cpp_quote("// See the LICENSE file in the project root for more information.") -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("") - -cpp_quote("#if defined(_CLR_BLD) && !defined(FEATURE_FUSION)") -cpp_quote("#error FEATURE_FUSION is not enabled, please do not include fusionpriv.h") -cpp_quote("#endif") - - -import "objidl.idl"; -import "oleidl.idl"; -import "fusion.idl"; - - -cpp_quote("#ifdef _MSC_VER") -cpp_quote("#pragma once") -cpp_quote("#endif") - -interface IAssembly; -interface IAssemblyBindSink; -interface IAssemblyBinding; -interface IAssemblyManifestImport; -interface IAssemblyModuleImport; -interface IAssemblyBindingClosure; - -interface IAssemblyNameBinder; -interface IHistoryAssembly; -interface IHistoryReader; -interface IFusionBindLog; - -interface IAssemblyScavenger; - -interface IHostAssembly; -interface IHostAssemblyModuleImport; - -interface IMetaDataAssemblyImport; -#pragma midl_echo("struct IMetaDataAssemblyImport;") - -struct AssemblyReferenceClosureWalkContextForProfAPI; - -cpp_quote("EXTERN_C const IID IID_IApplicationContext; ") -cpp_quote("EXTERN_C const IID IID_IAssembly; ") -cpp_quote("EXTERN_C const IID IID_IAssemblyBindSink; ") -cpp_quote("EXTERN_C const IID IID_IAssemblyBinding; ") -cpp_quote("EXTERN_C const IID IID_IAssemblyManifestImport;") -cpp_quote("EXTERN_C const IID IID_IAssemblyModuleImport; ") - -cpp_quote("EXTERN_C const IID IID_IHistoryAssembly; ") -cpp_quote("EXTERN_C const IID IID_IHistoryReader; ") -cpp_quote("EXTERN_C const IID IID_IMetaDataAssemblyImportControl; ") - -cpp_quote("EXTERN_C const IID IID_IAssemblyScavenger; ") - -cpp_quote("EXTERN_C const IID IID_IHostAssembly; ") -cpp_quote("EXTERN_C const IID IID_IHostAssemblyModuleImport; ") -// -// Bind flags for IAssemblyName::BindToObject -// -// External caller of IAssemblyName::BindToObject should only use ASM_BINDF_PARENT_ASM_HINT/ASM_BINDF_NONE/ASM_BINDF_INSPECTION_ONLY. -// The rest is used internally by fusion. They can(and should) be set via IApplicationContext::Set. -// -typedef enum -{ - ASM_BINDF_NONE = 0x0, - ASM_BINDF_FORCE_CACHE_INSTALL = 0x1, - ASM_BINDF_RFS_INTEGRITY_CHECK = 0x2, - ASM_BINDF_RFS_MODULE_CHECK = 0x4, - ASM_BINDF_BINPATH_PROBE_ONLY = 0x8, - //ASM_BINDF_SHARED_BINPATH_HINT = 0x10, - ASM_BINDF_PARENT_ASM_HINT = 0x20, - ASM_BINDF_DISALLOW_APPLYPUBLISHERPOLICY = 0x40, - ASM_BINDF_DISALLOW_APPBINDINGREDIRECTS = 0x80, - ASM_BINDF_DISABLE_FX_UNIFICATION = 0x100, - ASM_BINDF_DO_NOT_PROBE_NATIVE_IMAGE = 0x200, - ASM_BINDF_DISABLE_DOWNLOAD = 0x400, - ASM_BINDF_INSPECTION_ONLY = 0x800, - ASM_BINDF_DISALLOW_APP_BASE_PROBING = 0x1000, - ASM_BINDF_SUPPRESS_SECURITY_CHECKS = 0x2000 -} ASM_BIND_FLAGS; - -typedef enum tagDEVOVERRIDEMODE { - DEVOVERRIDE_LOCAL = 0x1, - DEVOVERRIDE_GLOBAL = 0x2 -} DEVOVERRIDEMODE; - -typedef enum tagWALK_LEVEL -{ - LEVEL_STARTING, // only basic info - LEVEL_WINRTCHECK, // WinRT specific checks - LEVEL_GACCHECK, // until find something outside of the GAC - LEVEL_COMPLETE, // no reason to request higher than this - LEVEL_FXPREDICTED, // full walk, but FX assemblies were predicted - LEVEL_FXPROBED // full walk, but FX assemblies could not be predicted -} WALK_LEVEL; - -/////////////////////////////////////////////////////////////////////////////// -// -// IHistoryAssembly -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(e6096a07-e188-4a49-8d50-2a0172a0d205), - pointer_default(unique) -] -interface IHistoryAssembly : IUnknown -{ - HRESULT GetAssemblyName - ( - [out, annotation("__out")] LPWSTR wzAsmName, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetPublicKeyToken - ( - [out, annotation("__out")] LPWSTR wzPublicKeyToken, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetCulture - ( - [out, annotation("__out")] LPWSTR wzCulture, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetReferenceVersion - ( - [out, annotation("__out")] LPWSTR wzVerRef, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetActivationDate - ( - [out, annotation("__out")] LPWSTR wzActivationDate, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetAppCfgVersion - ( - [out, annotation("__out")] LPWSTR pwzVerAppCfg, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetPublisherCfgVersion - ( - [out, annotation("__out")] LPWSTR pwzVerPublisherCfg, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetAdminCfgVersion - ( - [out, annotation("__out")] LPWSTR pwzAdminCfg, - [in, out, annotation("__inout")] DWORD *pdwSize - ); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IHistoryReader -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(1d23df4d-a1e2-4b8b-93d6-6ea3dc285a54), - pointer_default(unique) -] -interface IHistoryReader : IUnknown -{ - HRESULT GetFilePath - ( - [out, annotation("__out")] LPWSTR wzFilePath, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetApplicationName - ( - [out, annotation("__out")] LPWSTR wzAppName, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetEXEModulePath - ( - [out, annotation("__out")] LPWSTR wzExePath, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - - HRESULT GetNumActivations - ( - [out] DWORD *pdwNumActivations - ); - - HRESULT GetActivationDate - ( - [in] DWORD dwIdx, - [out] FILETIME *pftDate - ); - - HRESULT GetRunTimeVersion - ( - [in] FILETIME *pftActivationDate, - [out, annotation("__out")] LPWSTR wzRunTimeVersion, - [in, out, annotation("__inout")] DWORD *pdwSize - ); - - HRESULT GetNumAssemblies - ( - [in] FILETIME *pftActivationDate, - [out] DWORD *pdwNumAsms - ); - - HRESULT GetHistoryAssembly - ( - [in] FILETIME *pftActivationDate, - [in] DWORD dwIdx, - [out] IHistoryAssembly **ppHistAsm - ); -} - -typedef enum { - LOADCTX_TYPE_DEFAULT, - LOADCTX_TYPE_LOADFROM, - LOADCTX_TYPE_UNKNOWN, - LOADCTX_TYPE_HOSTED, // Assembly bind was provided by hosted binder. -} LOADCTX_TYPE; - -// Log for normal assembly binding -cpp_quote("#define FUSION_BIND_LOG_CATEGORY_DEFAULT 0") -// Log for native image binding -cpp_quote("#define FUSION_BIND_LOG_CATEGORY_NGEN 1") -// max entry for bind log kinds. Should always point to the biggest one -cpp_quote("#define FUSION_BIND_LOG_CATEGORY_MAX 2") - -/////////////////////////////////////////////////////////////////////////////// -// -// IFusionBindLog -// -/////////////////////////////////////////////////////////////////////////////// - -[ - local, - object, - uuid(67E9F87D-8B8A-4a90-9D3E-85ED5B2DCC83), - pointer_default(unique) -] -interface IFusionBindLog : IUnknown -{ - HRESULT SetResultCode - ( - [in] DWORD dwLogCategory, - [in] HRESULT hr - ); - - HRESULT GetResultCode - ( - [in] DWORD dwLogCategory, - [out] HRESULT *pHr - ); - - HRESULT GetBindLog - ( - [in] DWORD dwDetailLevel, - [in] DWORD dwLogCategory, - [out, annotation("__out_opt")] LPWSTR pwzDebugLog, - [in, out, annotation("__inout")] DWORD *pcbDebugLog - ); - - HRESULT LogMessage - ( - [in] DWORD dwDetailLevel, - [in] DWORD dwLogCategory, - [in] LPCWSTR pwzDebugLog - ); - - HRESULT Flush - ( - [in] DWORD dwDetailLevel, - [in] DWORD dwLogCategory - ); - - HRESULT GetBindingID - ( - [out] ULONGLONG *pullBindingID - ); - - HRESULT ETWTraceLogMessage - ( - [in] DWORD dwETWLogCategory, - [in] IAssemblyName *pAsm - ); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyManifestImport -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid( de9a68ba-0fa2-11d3-94aa-00c04fc308ff), - pointer_default(unique) -] -interface IAssemblyManifestImport: IUnknown -{ - typedef [unique] IAssemblyManifestImport *LPASSEMBLY_MANIFEST_IMPORT; - - HRESULT GetAssemblyNameDef( - [out] IAssemblyName **ppAssemblyName); - - HRESULT GetNextAssemblyNameRef( - [in] DWORD nIndex, - [out] IAssemblyName ** ppAssemblyName); - - HRESULT GetNextAssemblyModule( - [in] DWORD nIndex, - [out] IAssemblyModuleImport **ppImport); - - HRESULT GetModuleByName( - [in] LPCOLESTR szModuleName, - [out] IAssemblyModuleImport **ppModImport); - - HRESULT GetManifestModulePath( - [out, size_is(*pccModulePath), annotation("__out_ecount_full(*pccModulePath)")] LPOLESTR szModulePath, - [in, out] LPDWORD pccModulePath); - - HRESULT GetInternalMDImport( - [out] IMetaDataAssemblyImport **ppMDImport); - - HRESULT LoadDataFromMDImport( - [in] IMetaDataAssemblyImport *ppMDImport); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IApplicationContext -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(7c23ff90-33af-11d3-95da-00a024a85b51), - pointer_default(unique) -] -interface IApplicationContext: IUnknown -{ - cpp_quote("// App context configuration variables") - cpp_quote("#define ACTAG_APP_BASE_URL L\"APPBASE\"") - cpp_quote("#define ACTAG_MACHINE_CONFIG L\"MACHINE_CONFIG\"") - cpp_quote("#define ACTAG_APP_PRIVATE_BINPATH L\"PRIVATE_BINPATH\"") - cpp_quote("#define ACTAG_APP_SHARED_BINPATH L\"SHARED_BINPATH\"") - cpp_quote("#define ACTAG_APP_SNAPSHOT_ID L\"SNAPSHOT_ID\"") - cpp_quote("#define ACTAG_APP_CONFIG_FILE L\"APP_CONFIG_FILE\"") - cpp_quote("#define ACTAG_APP_ID L\"APPLICATION_ID\"") - cpp_quote("#define ACTAG_APP_SHADOW_COPY_DIRS L\"SHADOW_COPY_DIRS\"") - cpp_quote("#define ACTAG_APP_DYNAMIC_BASE L\"DYNAMIC_BASE\"") - cpp_quote("#define ACTAG_APP_CACHE_BASE L\"CACHE_BASE\"") - cpp_quote("#define ACTAG_APP_NAME L\"APP_NAME\"") - cpp_quote("#define ACTAG_DEV_PATH L\"DEV_PATH\"") - cpp_quote("#define ACTAG_HOST_CONFIG_FILE L\"HOST_CONFIG\"") - cpp_quote("#define ACTAG_SXS_ACTIVATION_CONTEXT L\"SXS\"") - cpp_quote("#define ACTAG_APP_CFG_LOCAL_FILEPATH L\"APP_CFG_LOCAL_FILEPATH\"") - cpp_quote("#define ACTAG_ZAP_STRING L\"ZAP_STRING\"") - cpp_quote("#define ACTAG_ZAP_CONFIG_FLAGS L\"ZAP_CONFIG_FLAGS\"") - cpp_quote("#define ACTAG_APP_DOMAIN_ID L\"APPDOMAIN_ID\"") - cpp_quote("#define ACTAG_APP_CONFIG_BLOB L\"APP_CONFIG_BLOB\"") - cpp_quote("#define ACTAG_FX_ONLY L\"FX_ONLY\"") - - cpp_quote("// App context flag overrides") - cpp_quote("#define ACTAG_FORCE_CACHE_INSTALL L\"FORCE_CACHE_INSTALL\"") - cpp_quote("#define ACTAG_RFS_INTEGRITY_CHECK L\"RFS_INTEGRITY_CHECK\"") - cpp_quote("#define ACTAG_RFS_MODULE_CHECK L\"RFS_MODULE_CHECK\"") - cpp_quote("#define ACTAG_BINPATH_PROBE_ONLY L\"BINPATH_PROBE_ONLY\"") - cpp_quote("#define ACTAG_DISALLOW_APPLYPUBLISHERPOLICY L\"DISALLOW_APP\"") - cpp_quote("#define ACTAG_DISALLOW_APP_BINDING_REDIRECTS L\"DISALLOW_APP_REDIRECTS\"") - cpp_quote("#define ACTAG_DISALLOW_APP_BASE_PROBING L\"DISALLOW_APP_BASE_PROBING\"") - cpp_quote("#define ACTAG_CODE_DOWNLOAD_DISABLED L\"CODE_DOWNLOAD_DISABLED\"") - cpp_quote("#define ACTAG_DISABLE_FX_ASM_UNIFICATION L\"DISABLE_FX_ASM_UNIFICATION\"") - - typedef [unique] IApplicationContext *LPAPPLICATIONCONTEXT; - - typedef enum - { - APP_CTX_FLAGS_INTERFACE = 0x1 - } APP_FLAGS; - - HRESULT SetContextNameObject( - [in] LPASSEMBLYNAME pName); - - HRESULT GetContextNameObject( - [out] LPASSEMBLYNAME * ppName); - - - HRESULT Set( - [in] LPCOLESTR szName, - [in] LPVOID pvValue, - [in] DWORD cbValue, - [in] DWORD dwFlags); - - HRESULT Get( - [in] LPCOLESTR szName, - [out] LPVOID pvValue, - [in, out] LPDWORD pcbValue, - [in] DWORD dwFlags); - - HRESULT GetDynamicDirectory( - [out, annotation("__out_ecount_opt(*pdwSize)")] LPWSTR wzDynamicDir, - [in, out] LPDWORD pdwSize); - - HRESULT GetAppCacheDirectory( - [out, annotation("__out_ecount_opt(*pdwSize)")] LPWSTR wzAppCacheDir, - [in, out] LPDWORD pdwSize); - - HRESULT RegisterKnownAssembly( - [in] IAssemblyName *pName, - [in] LPCWSTR pwzAsmURL, - [out] IAssembly **ppAsmOut); - - HRESULT PrefetchAppConfigFile(); - - // This will give a IAssemblyBindingClosure object without really walking - // the closure. Any of the APIs on IAssemblyBindingClosure may trigger a - // real walking. - // - // This closure is not cached in fusion. Caller is responsible to cache the closure. - // - // pUnk is the result of a previous bind within the same application context. - // It could be IHostAssembly or IAssembly. The assembly has to be strongly named. - // - // dwSharingFlags cannot be 0 now. - HRESULT GetAssemblyBindingClosure( - [in] IUnknown *pUnk, - [in] LPCWSTR pwzNativeImagePath, - [out] IAssemblyBindingClosure **ppAsmClosure - ); -} - -[ - local, - object, - uuid(56972d9d-0f6c-47de-a038-e82d5de3a777), - pointer_default(unique) -] -interface IAssemblyNameBinder : IUnknown -{ - HRESULT BindToObject( - [in] REFIID refIID, - [in] IUnknown *pUnkSink, - [in] IUnknown *pUnkContext, - [in] LPCOLESTR szCodeBase, - [in] LONGLONG llFlags, - [in] LPVOID pParentAssembly, - [in] DWORD cbReserved, - [out] LPVOID *ppv, - [out] LPVOID *ppvNI); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssembly -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(ff08d7d4-04c2-11d3-94aa-00c04fc308ff), - pointer_default(unique) -] -interface IAssembly : IUnknown -{ - typedef [unique] IAssembly *LPASSEMBLY; - - cpp_quote("#define ASMLOC_LOCATION_MASK 0x0000001B") - cpp_quote("#define ASMLOC_UNKNOWN 0x00000000") - cpp_quote("#define ASMLOC_GAC 0x00000001") - cpp_quote("#define ASMLOC_DOWNLOAD_CACHE 0x00000002") - cpp_quote("#define ASMLOC_RUN_FROM_SOURCE 0x00000003") - cpp_quote("#define ASMLOC_CODEBASE_HINT 0x00000004") - cpp_quote("#define ASMLOC_ZAP 0x00000008") - cpp_quote("#define ASMLOC_DEV_OVERRIDE 0x00000010") - - HRESULT GetAssemblyNameDef( - [out] IAssemblyName **ppAssemblyName); - - HRESULT GetNextAssemblyNameRef( - [in] DWORD nIndex, - [out] IAssemblyName **ppAssemblyName); - - HRESULT GetNextAssemblyModule( - [in] DWORD nIndex, - [out] IAssemblyModuleImport **ppModImport); - - HRESULT GetModuleByName( - [in] LPCOLESTR szModuleName, - [out] IAssemblyModuleImport **ppModImport); - - HRESULT GetManifestModulePath( - [out, size_is(*pccModulePath), annotation("__out_ecount_full_opt(*pccModulePath)")] LPOLESTR szModulePath, - [in, out] LPDWORD pccModulePath); - - HRESULT GetAssemblyPath( - [out, size_is(*lpcwBuffer), annotation("__out_ecount_full_opt(*lpcwBuffer)")] LPOLESTR pStr, - [in, out] LPDWORD lpcwBuffer); - - HRESULT GetAssemblyLocation( - [out] DWORD *pdwAsmLocation); - - LOADCTX_TYPE GetFusionLoadContext(); - - HRESULT GetNextHardBoundDependency( - [in] DWORD dwIndex, - [out] IAssembly **ppILAsm, - [out] IAssembly **ppNIAsm); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyBindingClosureEnumerator -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(b3f1e4ed-cb09-4b85-9a1b-6809582f1ebc), - pointer_default(unique) -] -interface IAssemblyBindingClosureEnumerator : IUnknown -{ - // Get the next assembly in the closure's path - HRESULT GetNextAssemblyPath( - [out] LPCOLESTR *ppPath, - [out] LPCOLESTR *ppniPath); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyBindingClosure -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(415c226a-e513-41ba-9651-9c48e97aa5de), - pointer_default(unique) -] -interface IAssemblyBindingClosure : IUnknown -{ - // Test if all the assemblies in the closure are in GAC. - // return: - // S_OK all assemblies are in GAC. - // S_FALSE not all assemblies are in GAC. - // otherwise failure. - HRESULT IsAllAssembliesInGAC(); - - // Test to see if two closures are semantically the same - // under the specified sharing context. - // return: - // S_OK Equal. - // S_FALSE Not Equal. - // otherwise failure. - HRESULT IsEqual( - [in] IAssemblyBindingClosure *pAssemblyClosure - ); - - HRESULT GetNextFailureAssembly( - [in] DWORD dwIndex, - [out] IAssemblyName **ppName, - [out] HRESULT *pHResult); - - // ensure enough data is available - HRESULT EnsureWalked( - [in] IUnknown *pStartingAssembly, - [in] IApplicationContext *pAppCtx, - [in] WALK_LEVEL level); - - // Iterate over assembly paths in the closure - HRESULT EnumerateAssemblies( - [out] IAssemblyBindingClosureEnumerator **ppEnumerator); - - HRESULT HasBeenWalked([in] WALK_LEVEL level); - - // Test if the assembly might have unknonwn dependecies because of WinRT - // return: - // S_OK May. - // S_FALSE No, all dependecies are traceable or FX. - // otherwise failure. - HRESULT MayHaveUnknownDependencies(); - - - // The closure walker asks the profiler (when present) for any additional - // assembly references the profiler wishes to add. This method is then called - // back by the profiler for each such assembly reference. - HRESULT AddProfilerAssemblyReference( - [in] LPVOID pbPublicKeyOrToken, - [in] ULONG cbPublicKeyOrToken, - [in] LPCWSTR szName, - [in] LPVOID pMetaData, - [in] void *pbHashValue, - [in] ULONG cbHashValue, - [in] DWORD dwAssemblyRefFlags, - [in] struct AssemblyReferenceClosureWalkContextForProfAPI * pContext); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyBindSink -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(af0bc960-0b9a-11d3-95ca-00a024a85b51), - pointer_default(unique) -] -interface IAssemblyBindSink : IUnknown -{ - typedef [unique] IAssemblyBindSink *LPASSEMBLY_BIND_SINK; - - typedef struct _tagFusionBindInfo - { - IFusionBindLog *pdbglog; - IAssemblyName *pNamePolicy; - DWORD dwPoliciesApplied; - } FusionBindInfo; - - typedef enum - { - ASM_NOTIFICATION_START, - ASM_NOTIFICATION_PROGRESS, - ASM_NOTIFICATION_SUSPEND, - ASM_NOTIFICATION_ATTEMPT_NEXT_CODEBASE, - ASM_NOTIFICATION_BIND_INFO, - ASM_NOTIFICATION_DONE, - ASM_NOTIFICATION_NATIVE_IMAGE_DONE - } ASM_NOTIFICATION; - - - HRESULT OnProgress( - [in] DWORD dwNotification, - [in] HRESULT hrNotification, - [in] LPCWSTR szNotification, - [in] DWORD dwProgress, - [in] DWORD dwProgressMax, - [in] LPVOID pvBindInfo, - [in] IUnknown *pUnk); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyBinding -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(cfe52a80-12bd-11d3-95ca-00a024a85b51), - pointer_default(unique) -] -interface IAssemblyBinding : IUnknown -{ - typedef [unique] IAssemblyBinding *LPASSEMBLY_BINDINDING; - - HRESULT Control( - [in] HRESULT hrControl); - - HRESULT DoDefaultUI( - [in] HWND hWnd, - [in] DWORD dwFlags); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyModuleImport -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(da0cd4b0-1117-11d3-95ca-00a024a85b51), - pointer_default(unique) -] -interface IAssemblyModuleImport : IStream -{ - typedef [unique] IAssemblyModuleImport *LPASSEMBLY_MODULE_IMPORT; - - HRESULT GetModuleName( - [out, size_is(*pccModuleName), annotation("__out_ecount_full_opt(*pccModuleName)")] LPOLESTR szModuleName, - [in, out] LPDWORD pccModuleName); - - HRESULT GetHashAlgId( - [out] LPDWORD pdwHashAlgId); - - HRESULT GetHashValue( - [out, size_is(*pcbHashValue)] BYTE *pbHashValue, - [in, out] LPDWORD pcbHashValue); - - HRESULT GetFlags( - [out] LPDWORD pdwFlags); - - HRESULT GetModulePath( - [out, size_is(*pccModulePath), annotation("__out_ecount_full_opt(*pccModulePath)")] LPOLESTR szModulePath, - [in, out] LPDWORD pccModulePath); - - BOOL IsAvailable(); - - HRESULT BindToObject( - [in] IAssemblyBindSink *pBindSink, - [in] IApplicationContext *pAppCtx, - [in] LONGLONG llFlags, - [out] LPVOID *ppv); -} - - -/////////////////////////////////////////////////////////////////////////////// -// -// IAssemblyScavenger -// -/////////////////////////////////////////////////////////////////////////////// -[ - local, - object, - uuid(21b8916c-f28e-11d2-a473-00ccff8ef448), - pointer_default(unique) -] -interface IAssemblyScavenger : IUnknown -{ - - HRESULT ScavengeAssemblyCache - ( - ); - - HRESULT GetCacheDiskQuotas - ( - [out] DWORD *pdwZapQuotaInGAC, - [out] DWORD *pdwDownloadQuotaAdmin, - [out] DWORD *pdwDownloadQuotaUser - ); - - HRESULT SetCacheDiskQuotas - ( - [in] DWORD dwZapQuotaInGAC, - [in] DWORD dwDownloadQuotaAdmin, - [in] DWORD dwDownloadQuotaUser - ); - - HRESULT GetCurrentCacheUsage - ( - [out] DWORD *dwZapUsage, - [out] DWORD *dwDownloadUsage - ); -} - - -/////////////////////////////////////////////////////////////////////////////// - -[ - local, - object, - uuid(D8FB9BD6-3969-11d3-B4AF-00C04F8ECB26), - pointer_default(unique) -] -interface ICodebaseList : IUnknown -{ - HRESULT AddCodebase - ( - [in] LPCWSTR wzCodebase, - [in] DWORD dwFlags - ); - - HRESULT RemoveCodebase - ( - [in] DWORD dwIndex - ); - - HRESULT RemoveAll(); - - HRESULT GetCount - ( - [out] DWORD *pdwCount - ); - - HRESULT GetCodebase - ( - [in] DWORD dwIndex, - [out] DWORD *pdwFlags, - [out, annotation("__out_ecount_opt(*pcbCodebase)")] - LPWSTR wzCodebase, - [in, out] DWORD *pcbCodebase - ); -} - -[ - local, - object, - uuid(0A6F16F8-ACD7-11d3-B4ED-00C04F8ECB26), - pointer_default(unique) -] -interface IDownloadMgr : IUnknown -{ - HRESULT PreDownloadCheck - ( - [out] void **ppv, - [out] void **ppvNI - ); - - HRESULT DoSetup - ( - [in] LPCWSTR wzSourceUrl, - [in] LPCWSTR wzFilePath, - [in] const FILETIME *pftLastMod, - [out] IUnknown **ppUnk, - [out] IUnknown **ppAsmNI - ); - - HRESULT ProbeFailed - ( - [out] IUnknown **ppUnk - ); - - HRESULT IsDuplicate - ( - [out] IDownloadMgr *ppDLMgr - ); - - HRESULT LogResult(); - - HRESULT DownloadEnabled - ( - [out] BOOL *pbEnabled - ); - - HRESULT GetBindInfo - ( - [out] FusionBindInfo *pBindInfo - ); - - HRESULT CacheBindingResult - ( - [in] HRESULT hrResult - ); -} - - -[ - local, - object, - uuid(711f7c2d-8234-4505-b02f-7554f46cbf29), - pointer_default(unique) -] -interface IHostAssembly : IUnknown -{ - typedef [unique] IHostAssembly *LPHOSTASSEMBLY; - - HRESULT GetAssemblyNameDef( - [out] IAssemblyName **ppAssemblyName); - - HRESULT GetNextAssemblyNameRef( - [in] DWORD nIndex, - [out] IAssemblyName **ppAssemblyName); - - HRESULT GetNextAssemblyModule( - [in] DWORD nIndex, - [out] IHostAssemblyModuleImport **ppModImport); - - HRESULT GetModuleByName( - [in] LPCOLESTR szModuleName, - [out] IHostAssemblyModuleImport **ppModImport); - - // Always release the copy in fusion - HRESULT GetAssemblyStream( - [out] IStream **ppStreamAsm); - - HRESULT GetAssemblyId( - [out] UINT64 *pAssemblyId); - - // Always release the copy in fusion - HRESULT GetAssemblyDebugStream( - [out] IStream **ppDebugStream); - - LOADCTX_TYPE GetFusionLoadContext( - ); - - HRESULT GetAssemblyContext( - [out] UINT64 *pdwAssemblyContext); -} - -[ - local, - object, - uuid(b6f2729d-6c0f-4944-b692-e5a2ce2c6e7a), - pointer_default(unique) -] -interface IHostAssemblyModuleImport : IUnknown -{ - typedef [unique] IHostAssemblyModuleImport *LPHOSTASSEMBLY_MODULE_IMPORT; - - HRESULT GetModuleName( - [out, size_is(*pccModuleName), annotation("__out_ecount_full(*pccModuleName)")] LPOLESTR szModuleName, - [in, out] LPDWORD pccModuleName); - - HRESULT GetModuleStream( - [out] IStream **ppStreamModule); - - HRESULT GetModuleId( - [out] DWORD *pdwModuleId); - - HRESULT GetModuleDebugStream( - [out] IStream **ppDebugStream); -} - - -#pragma midl_echo("STDAPI CreateHistoryReader(LPCWSTR wzFilePath, IHistoryReader **ppHistReader);") -#pragma midl_echo("STDAPI LookupHistoryAssembly(LPCWSTR pwzFilePath, FILETIME *pftActivationDate, LPCWSTR pwzAsmName, LPCWSTR pwzPublicKeyToken, LPCWSTR wzCulture, LPCWSTR pwzVerRef, IHistoryAssembly **pHistAsm);") -#pragma midl_echo("STDAPI GetHistoryFileDirectory(__out_ecount_opt(*pdwSize) LPWSTR wzDir, DWORD *pdwSize);") -#pragma midl_echo("STDAPI PreBindAssembly(IApplicationContext *pAppCtx, IAssemblyName *pName, IAssembly *pAsmParent, IAssemblyName **ppNamePostPolicy, LPVOID pvReserved); ") - -#pragma midl_echo("STDAPI CreateApplicationContext(IAssemblyName *pName, LPAPPLICATIONCONTEXT *ppCtx); ") -#pragma midl_echo("STDAPI IsRetargetableAssembly(IAssemblyName *pName, BOOL *pbIsRetargetable); ") -#pragma midl_echo("STDAPI IsOptionallyRetargetableAssembly(IAssemblyName *pName, BOOL *pbIsRetargetable); ") - - -cpp_quote("#define EXPLICITBIND_FLAGS_NON_BINDABLE 0x0") -cpp_quote("#define EXPLICITBIND_FLAGS_EXE 0x1") - diff --git a/src/inc/fusionsink.h b/src/inc/fusionsink.h deleted file mode 100644 index adf88d4cd4..0000000000 --- a/src/inc/fusionsink.h +++ /dev/null @@ -1,129 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -/*============================================================ -** -** Header: FusionSink.hpp -** -** Purpose: Implements FusionSink -** -** -===========================================================*/ -#ifndef _FUSIONSINK_H -#define _FUSIONSINK_H - -#include <fusion.h> -#include <fusionpriv.h> -#include "corhlpr.h" -#include "corpriv.h" - -class FusionSink : public IAssemblyBindSink, public INativeImageEvaluate -{ -public: - - FusionSink() : - m_punk(NULL), - m_pNIunk(NULL), - m_pAbortUnk(NULL), - m_pFusionLog(NULL), - m_cRef(1), - m_hEvent(NULL), - m_LastResult(S_OK) - { - WRAPPER_NO_CONTRACT; - } - - virtual void Reset() - { - CONTRACTL - { - INSTANCE_CHECK; - NOTHROW; - } - CONTRACTL_END; - - if(m_pAbortUnk) { - m_pAbortUnk->Release(); - m_pAbortUnk = NULL; - } - - if(m_punk) { - m_punk->Release(); - m_punk = NULL; - } - - if(m_pNIunk) { - m_pNIunk->Release(); - m_pNIunk = NULL; - } - - if(m_pFusionLog) { - m_pFusionLog->Release(); - m_pFusionLog = NULL; - } - - m_LastResult = S_OK; - } - - ~FusionSink() - { - CONTRACTL - { - DESTRUCTOR_CHECK; - NOTHROW; - } - CONTRACTL_END; - - if(m_hEvent) { - delete m_hEvent; - m_hEvent = NULL; - } - - Reset(); - } - - HRESULT AssemblyResetEvent(); - HRESULT LastResult() - { - LIMITED_METHOD_CONTRACT; - return m_LastResult; - } - - STDMETHODIMP QueryInterface(REFIID riid, void **ppInterface); - ULONG STDMETHODCALLTYPE AddRef(void); - ULONG STDMETHODCALLTYPE Release(void); - - STDMETHODIMP OnProgress(DWORD dwNotification, - HRESULT hrNotification, - LPCWSTR szNotification, - DWORD dwProgress, - DWORD dwProgressMax, - LPVOID pvBindInfo, - IUnknown* punk); - - // Wait on the event. - virtual HRESULT Wait(); - - STDMETHODIMP Evaluate( - IAssembly *pILAssembly, - IAssembly *pNativeAssembly, - BYTE * pbCachedData, - DWORD dwDataSize); - - IUnknown* m_punk; // Getting an assembly - IUnknown* m_pNIunk; // Getting an assembly - IUnknown* m_pAbortUnk; // pUnk for aborting a bind - IFusionBindLog *m_pFusionLog; - -protected: - HRESULT AssemblyCreateEvent(); - - LONG m_cRef; // Ref count. - Event *m_hEvent; // Event to block thread. - HRESULT m_LastResult; // Last notification result -}; - -#endif // _FUSIONSINK_H diff --git a/src/inc/holder.h b/src/inc/holder.h index cb0040549d..a92eeabaab 100644 --- a/src/inc/holder.h +++ b/src/inc/holder.h @@ -65,12 +65,6 @@ #ifdef _DEBUG -#ifdef FEATURE_FUSION -namespace NATIVE_BINDER_SPACE -{ - class NativeAssembly; -} -#endif //FEATURE_FUSION //------------------------------------------------------------------------------------------------ // This is used to make Visual Studio autoexp.dat work sensibly with holders again. @@ -95,18 +89,6 @@ struct AutoExpVisibleValue union { // Only include a class name here if it is customarily referred to through an abstract interface. -#ifdef FEATURE_FUSION - const class CAssemblyName *_asCAssemblyName; - const class CAssembly *_asCAssembly; - const class CAssemblyManifestImport *_asCAssemblyManifestImport; - const class CAssemblyModuleImport *_asCAssemblyModuleImport; - const class CHostAssembly *_asCHostAssembly; - const class CHostAssemblyModuleImport *_asCHostAssemblyModuleImport; - const class BindResult *_asBindResult; - const class BindContext *_asBindContext; - const class NATIVE_BINDER_SPACE::NativeAssembly *_asNativeAssembly; - const class AssemblyLocation *_asAssemblyLocation; -#endif //FEATURE_FUSION #if defined(FEATURE_APPX) const class AppXBindResultImpl *_asAppXBindResultImpl; diff --git a/src/inc/vptr_list.h b/src/inc/vptr_list.h index 11c91bba03..86c12aec35 100644 --- a/src/inc/vptr_list.h +++ b/src/inc/vptr_list.h @@ -65,9 +65,6 @@ VPTR_CLASS(MappedImageLayout) VPTR_CLASS(LoadedImageLayout) #endif // !CROSSGEN_COMPILE && !FEATURE_PAL VPTR_CLASS(FlatImageLayout) -#ifdef FEATURE_FUSION -VPTR_CLASS(StreamImageLayout) -#endif #ifdef FEATURE_COMINTEROP VPTR_CLASS(ComMethodFrame) VPTR_CLASS(ComPlusMethodFrame) diff --git a/src/inc/zapper.h b/src/inc/zapper.h index 26ac7e8f14..80229fc528 100644 --- a/src/inc/zapper.h +++ b/src/inc/zapper.h @@ -18,9 +18,6 @@ #include "shash.h" #include "utilcode.h" #include "corjit.h" -#ifdef FEATURE_FUSION -#include "binderngen.h" -#endif #include "corcompile.h" #include "corhlprpriv.h" #include "ngen.h" @@ -294,30 +291,6 @@ class Zapper void InitEE(BOOL fForceDebug, BOOL fForceProfile, BOOL fForceInstrument); void LoadAndInitializeJITForNgen(LPCWSTR pwzJitName, OUT HINSTANCE* phJit, OUT ICorJitCompiler** ppICorJitCompiler); -#ifdef FEATURE_FUSION - HRESULT TryEnumerateFusionCache(LPCWSTR assemblyName, bool fPrint, bool fDelete); - int EnumerateFusionCache(LPCWSTR assemblyName, bool fPrint, bool fDelete, - CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig = NULL); - void PrintFusionCacheEntry(CorSvcLogLevel logLevel, IAssemblyName *pZapAssemblyName); - void DeleteFusionCacheEntry(IAssemblyName *pZapAssemblyName); - void DeleteFusionCacheEntry(LPCWSTR assemblyName, CORCOMPILE_NGEN_SIGNATURE *pNativeImageSig); - - void PrintDependencies( - IMetaDataAssemblyImport * pAssemblyImport, - CORCOMPILE_DEPENDENCY * pDependencies, - COUNT_T cDependencies, - SString &s); - BOOL VerifyDependencies( - IMDInternalImport * pAssemblyImport, - CORCOMPILE_DEPENDENCY * pDependencies, - COUNT_T cDependencies); - - void PrintAssemblyVersionInfo(IAssemblyName *pZapAssemblyName, SString &s); - - IAssemblyName *GetAssemblyFusionName(IMetaDataAssemblyImport *pImport); - IAssemblyName *GetAssemblyRefFusionName(IMetaDataAssemblyImport *pImport, - mdAssemblyRef ar); -#endif //FEATURE_FUSION BOOL IsAssembly(LPCWSTR path); |