summaryrefslogtreecommitdiff
path: root/src/vm/clrprivbinderloadfile.h
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 19:09:09 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 19:09:09 +0900
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /src/vm/clrprivbinderloadfile.h
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'src/vm/clrprivbinderloadfile.h')
-rw-r--r--src/vm/clrprivbinderloadfile.h148
1 files changed, 148 insertions, 0 deletions
diff --git a/src/vm/clrprivbinderloadfile.h b/src/vm/clrprivbinderloadfile.h
new file mode 100644
index 0000000000..02c4053ff4
--- /dev/null
+++ b/src/vm/clrprivbinderloadfile.h
@@ -0,0 +1,148 @@
+// 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.
+
+
+
+#pragma once
+
+#include "holder.h"
+#include "internalunknownimpl.h"
+#include "clrprivbinding.h"
+#include "clrprivruntimebinders.h"
+#include "clrprivbinderfusion.h"
+#include "clrprivbinderutil.h"
+
+class PEAssembly;
+
+//=====================================================================================================================
+class CLRPrivBinderLoadFile :
+ public IUnknownCommon<ICLRPrivBinder>
+{
+
+public:
+ //=============================================================================================
+ // ICLRPrivBinder methods
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(BindAssemblyByName)(
+ IAssemblyName * pAssemblyName,
+ ICLRPrivAssembly ** ppAssembly);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(VerifyBind)(
+ IAssemblyName *pAssemblyName,
+ ICLRPrivAssembly *pAssembly,
+ ICLRPrivAssemblyInfo *pAssemblyInfo);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(GetBinderFlags)(
+ DWORD *pBinderFlags)
+ {
+ LIMITED_METHOD_CONTRACT;
+ *pBinderFlags = BINDER_NONE;
+ return S_OK;
+ }
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(GetBinderID)(
+ UINT_PTR *pBinderId);
+
+ //---------------------------------------------------------------------------------------------
+ // FindAssemblyBySpec is not supported by this binder.
+ STDMETHOD(FindAssemblyBySpec)(
+ LPVOID pvAppDomain,
+ LPVOID pvAssemblySpec,
+ HRESULT * pResult,
+ ICLRPrivAssembly ** ppAssembly)
+ { STATIC_CONTRACT_WRAPPER; return E_FAIL; }
+
+ //=============================================================================================
+ // Class methods
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(BindAssemblyExplicit)(
+ PEImage* pImage,
+ IAssemblyName **ppAssemblyName,
+ ICLRPrivAssembly ** ppAssembly);
+
+ //---------------------------------------------------------------------------------------------
+ static
+ CLRPrivBinderLoadFile * GetOrCreateBinder();
+
+ //---------------------------------------------------------------------------------------------
+ ~CLRPrivBinderLoadFile();
+
+private:
+ //---------------------------------------------------------------------------------------------
+ CLRPrivBinderLoadFile();
+
+ //---------------------------------------------------------------------------------------------
+ ReleaseHolder<CLRPrivBinderFusion> m_pFrameworkBinder;
+
+ //---------------------------------------------------------------------------------------------
+ static CLRPrivBinderLoadFile * s_pSingleton;
+};
+
+class CLRPrivAssemblyLoadFile :
+ public IUnknownCommon<ICLRPrivAssembly>
+{
+protected:
+ ReleaseHolder<CLRPrivBinderLoadFile> m_pBinder;
+ ReleaseHolder<CLRPrivBinderFusion> m_pFrameworkBinder;
+ ReleaseHolder<CLRPrivBinderUtil::CLRPrivResourcePathImpl> m_pPathResource;
+
+public:
+ //---------------------------------------------------------------------------------------------
+ CLRPrivAssemblyLoadFile(
+ CLRPrivBinderLoadFile* pBinder,
+ CLRPrivBinderFusion* pFrameworkBinder,
+ CLRPrivBinderUtil::CLRPrivResourcePathImpl* pPathResource);
+
+ //=============================================================================================
+ // ICLRPrivAssembly methods
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(BindAssemblyByName)(
+ IAssemblyName * pAssemblyName,
+ ICLRPrivAssembly ** ppAssembly);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(VerifyBind)(
+ IAssemblyName *pAssemblyName,
+ ICLRPrivAssembly *pAssembly,
+ ICLRPrivAssemblyInfo *pAssemblyInfo);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(GetBinderFlags)(
+ DWORD *pBinderFlags)
+ {
+ LIMITED_METHOD_CONTRACT;
+ return m_pBinder->GetBinderFlags(pBinderFlags);
+ }
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(GetBinderID)(
+ UINT_PTR *pBinderId);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(IsShareable)(
+ BOOL * pbIsShareable);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(GetAvailableImageTypes)(
+ LPDWORD pdwImageTypes);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(GetImageResource)(
+ DWORD dwImageType,
+ DWORD *pdwImageType,
+ ICLRPrivResource ** ppIResource);
+
+ //---------------------------------------------------------------------------------------------
+ STDMETHOD(FindAssemblyBySpec)(
+ LPVOID pvAppDomain,
+ LPVOID pvAssemblySpec,
+ HRESULT * pResult,
+ ICLRPrivAssembly ** ppAssembly)
+ { STATIC_CONTRACT_WRAPPER; return m_pBinder->FindAssemblyBySpec(pvAppDomain, pvAssemblySpec, pResult, ppAssembly); }
+};