1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4// ============================================================
5//
6// BinderInterface.hpp
7//
8
9
10//
11// Defines the public AssemblyBinder interface
12//
13// ============================================================
14
15#ifndef __BINDER_INTERFACE_HPP__
16#define __BINDER_INTERFACE_HPP__
17
18class PEImage;
19class PEAssembly;
20class StringArrayList;
21
22namespace BINDER_SPACE
23{
24 class Assembly;
25 class AssemblyIdentityUTF8;
26};
27
28namespace BinderInterface
29{
30 HRESULT Init();
31
32 HRESULT SetupContext(/* in */ LPCWSTR wszApplicationBase,
33 /* in */ DWORD dwAppDomainId,
34 /* out */ IUnknown **ppIApplicationContext);
35
36 // See code:BINDER_SPACE::AssemblyBinder::GetAssembly for info on fNgenExplicitBind
37 // and fExplicitBindToNativeImage, and see code:CEECompileInfo::LoadAssemblyByPath
38 // for an example of how they're used.
39 HRESULT Bind(/* in */ IUnknown *pIApplicationContext,
40 /* in */ SString &assemblyDisplayName,
41 /* in */ LPCWSTR wszCodeBase,
42 /* in */ PEAssembly *pParentAssembly,
43 /* in */ BOOL fNgenExplicitBind,
44 /* in */ BOOL fExplicitBindToNativeImage,
45 /*out */ BINDER_SPACE::Assembly **ppAssembly);
46
47 //
48 // Called via managed AppDomain.ExecuteAssembly variants and during binding host setup
49 //
50 HRESULT SetupBindingPaths(/* in */ IUnknown *pIApplicationContext,
51 /* in */ SString &sTrustedPlatformAssemblies,
52 /* in */ SString &sPlatformResourceRoots,
53 /* in */ SString &sAppPaths,
54 /* in */ SString &sAppNiPaths);
55
56 //
57 // Called via CoreAssemblySpec::BindToSystem
58 //
59 HRESULT BindToSystem(/* in */ SString &sSystemDirectory,
60 /* out */ BINDER_SPACE::Assembly **ppSystemAssembly,
61 /* in */ bool fBindToNativeImage);
62
63#ifdef BINDER_DEBUG_LOG
64 HRESULT Log(/* in */ LPCWSTR wszMessage);
65#endif // BINDER_DEBUG_LOG
66
67};
68
69#endif
70