summaryrefslogtreecommitdiff
path: root/src/vm/ecall.cpp
diff options
context:
space:
mode:
authorLuqun Lou <luqunl@users.noreply.github.com>2018-03-27 14:20:09 -0700
committerJan Kotas <jkotas@microsoft.com>2018-03-27 14:20:09 -0700
commitd0833f90ed516b08871635a05c1d5657379b8053 (patch)
tree58b7943d065d14a238564c1bde4f7f38f635569e /src/vm/ecall.cpp
parentbfa1881ab5b65175f97119b74ef127e08de882e1 (diff)
downloadcoreclr-d0833f90ed516b08871635a05c1d5657379b8053.tar.gz
coreclr-d0833f90ed516b08871635a05c1d5657379b8053.tar.bz2
coreclr-d0833f90ed516b08871635a05c1d5657379b8053.zip
Enable reflection load ComImport assembly and Type.IsComObjectType (#16943)
* Enable reflection load ComImport assembly and Type.IsComObjectType * Update Enable reflection load ComImport assembly
Diffstat (limited to 'src/vm/ecall.cpp')
-rw-r--r--src/vm/ecall.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vm/ecall.cpp b/src/vm/ecall.cpp
index dacec45787..3812ff1030 100644
--- a/src/vm/ecall.cpp
+++ b/src/vm/ecall.cpp
@@ -320,10 +320,14 @@ PCODE ECall::GetFCallImpl(MethodDesc * pMD, BOOL * pfSharedOrDynamicFCallImpl /*
return GetFCallImpl(MscorlibBinder::GetMethod(METHOD__DELEGATE__CONSTRUCT_DELEGATE));
}
-#ifdef FEATURE_COMINTEROP
// COM imported classes have special constructors
- if (pMT->IsComObjectType() && pMT != g_pBaseCOMObject && pMT != g_pBaseRuntimeClass)
+ if (pMT->IsComObjectType()
+#ifdef FEATURE_COMINTEROP
+ && pMT != g_pBaseCOMObject && pMT != g_pBaseRuntimeClass
+#endif // FEATURE_COMINTEROP
+ )
{
+#ifdef FEATURE_COMINTEROP
if (pfSharedOrDynamicFCallImpl)
*pfSharedOrDynamicFCallImpl = TRUE;
@@ -333,8 +337,10 @@ PCODE ECall::GetFCallImpl(MethodDesc * pMD, BOOL * pfSharedOrDynamicFCallImpl /*
// FCComCtor does not need to be in the fcall hashtable since it does not erect frame.
return GetEEFuncEntryPoint(FCComCtor);
- }
+#else
+ COMPlusThrow(kPlatformNotSupportedException, IDS_EE_ERROR_COM);
#endif // FEATURE_COMINTEROP
+ }
if (!pMD->GetModule()->IsSystem())
COMPlusThrow(kSecurityException, BFA_ECALLS_MUST_BE_IN_SYS_MOD);