summaryrefslogtreecommitdiff
path: root/src/vm/corhost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/corhost.cpp')
-rw-r--r--src/vm/corhost.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index be91820e6c..c88a199c21 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -43,6 +43,7 @@
#include "winrttypenameconverter.h"
#endif
+extern "C" int dprintf(int fd, const char *format, ...);
GVAL_IMPL_INIT(DWORD, g_fHostConfig, 0);
@@ -801,7 +802,7 @@ HRESULT CorHost2::_CreateDelegate(
LPCWSTR wszMethodName,
INT_PTR* fnPtr)
{
-
+ dprintf(1, "#### CorHost2::_CreateDelegate B:\n");
CONTRACTL
{
NOTHROW;
@@ -829,10 +830,12 @@ HRESULT CorHost2::_CreateDelegate(
if(wszMethodName == NULL)
return E_INVALIDARG;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
// This is currently supported in default domain only
if (appDomainID != DefaultADID)
return HOST_E_INVALIDOPERATION;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
BEGIN_ENTRYPOINT_NOTHROW;
BEGIN_EXTERNAL_ENTRYPOINT(&hr);
@@ -845,39 +848,54 @@ HRESULT CorHost2::_CreateDelegate(
{
GCX_PREEMP();
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
AssemblySpec spec;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
spec.Init(szAssemblyName);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
Assembly* pAsm=spec.LoadAssembly(FILE_ACTIVE);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
TypeHandle th=pAsm->GetLoader()->LoadTypeByNameThrowing(pAsm,NULL,szClassName);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
MethodDesc* pMD=NULL;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
if (!th.IsTypeDesc())
{
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
pMD = MemberLoader::FindMethodByName(th.GetMethodTable(), szMethodName, MemberLoader::FM_Unique);
if (pMD == NULL)
{
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
// try again without the FM_Unique flag (error path)
pMD = MemberLoader::FindMethodByName(th.GetMethodTable(), szMethodName, MemberLoader::FM_Default);
if (pMD != NULL)
{
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
// the method exists but is overloaded
ThrowHR(COR_E_AMBIGUOUSMATCH);
}
}
}
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
if (pMD==NULL || !pMD->IsStatic() || pMD->ContainsGenericVariables())
ThrowHR(COR_E_MISSINGMETHOD);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
UMEntryThunk *pUMEntryThunk = pMD->GetLoaderAllocator()->GetUMEntryThunkCache()->GetUMEntryThunk(pMD);
*fnPtr = (INT_PTR)pUMEntryThunk->GetCode();
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
}
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
END_EXTERNAL_ENTRYPOINT;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
END_ENTRYPOINT_NOTHROW;
+ dprintf(1, "#### CorHost2::_CreateDelegate E: hr=%d\n", hr);
return hr;
}