Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuqun Lou <luqunl@microsoft.com>2017-06-27 03:25:58 +0300
committerLuqun Lou <luqunl@microsoft.com>2017-06-27 03:25:58 +0300
commit56e3e3f783dab5807b1fd7b3372e20dc37fab3a7 (patch)
treeca7776b47833f37fbeb72830263c1dd490bf182e /src/System.Private.Interop
parentea030fdfa0d85d92247d823fbe38a17a423d1a75 (diff)
Roll back CS1662871
Yi want to get more info about this change [tfs-changeset: 1663381]
Diffstat (limited to 'src/System.Private.Interop')
-rw-r--r--src/System.Private.Interop/src/Shared/__ComObject.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/System.Private.Interop/src/Shared/__ComObject.cs b/src/System.Private.Interop/src/Shared/__ComObject.cs
index 8d3512b7f..ea151f4d6 100644
--- a/src/System.Private.Interop/src/Shared/__ComObject.cs
+++ b/src/System.Private.Interop/src/Shared/__ComObject.cs
@@ -1689,7 +1689,11 @@ namespace System
castError = null;
IntPtr pComPtr = IntPtr.Zero;
+ if (!McgModuleManager.UseDynamicInterop)
+ return null;
+
// CastableObject support used for generics *only* for now
+
if (!interfaceType.IsGenericType())
{
RuntimeTypeHandle genericInterfaceType = FindCastableGenericInterfaceInCache(interfaceType, out pComPtr);
@@ -1842,7 +1846,9 @@ namespace System
bool hasValidDispatcher = true;
#if !RHTESTCL && !CORECLR && !CORERT && ENABLE_WINRT
- hasValidDispatcher = interfaceType.IsGenericType() ? !interfaceType.GetDispatchClassType().IsInvalid() : true;
+ hasValidDispatcher = McgModuleManager.UseDynamicInterop && interfaceType.IsGenericType() ?
+ !interfaceType.GetDispatchClassType().IsInvalid() :
+ true;
#endif
try