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:
authorJan Kotas <jkotas@microsoft.com>2017-03-25 00:22:19 +0300
committerGitHub <noreply@github.com>2017-03-25 00:22:19 +0300
commita1d6055fad00d272b29191afb5b95bfea2cd491e (patch)
treeb25c67d59606a04487879e8bcabb8dc557bba269
parent9f1e99c37ec8577d642c78084a080eb1e6b2001f (diff)
parent31250ba7d1a5798c8a26ad95061503415fa3ccfb (diff)
Merge pull request #3099 from dotnet-bot/from-tfs
Merge changes from TFS
-rw-r--r--src/System.Private.Interop/src/Shared/ComCallableObject.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/System.Private.Interop/src/Shared/ComCallableObject.cs b/src/System.Private.Interop/src/Shared/ComCallableObject.cs
index 81848e9db..63b9e9b86 100644
--- a/src/System.Private.Interop/src/Shared/ComCallableObject.cs
+++ b/src/System.Private.Interop/src/Shared/ComCallableObject.cs
@@ -1075,7 +1075,9 @@ namespace System.Runtime.InteropServices
/// </summary>
bool m_hasCCWTemplateData;
-
+ /// <summary>
+ /// Target object's RuntimeTypeHandle
+ /// </summary>
RuntimeTypeHandle m_type;
#endregion
@@ -1457,6 +1459,18 @@ namespace System.Runtime.InteropServices
}
}
+#if !RHTESTCL && !CORECLR && !CORERT && ENABLE_WINRT
+ // TODO: Dynamic Boxing support
+ // TODO: Optimize--it is possible that the following dynamic code is faster than above static code(CCWTemplate)
+ // if we cann't find a interfaceType for giving guid, try to enumerate all interfaces implemented by this target object to see anyone matchs given guid
+ if (McgModuleManager.UseDynamicInterop && !m_hasCCWTemplateData && interfaceType.IsNull() && !Internal.Runtime.Augments.RuntimeAugments.IsValueType(m_type))
+ {
+ RuntimeTypeHandle interfaceTypeHandleFromDynamic = DynamicInteropCCWTemplateHelper.FindInterfaceInCCWTemplate(m_type, ref iid);
+ if (!interfaceTypeHandleFromDynamic.IsNull())
+ return GetComInterfaceForType_NoCheck(interfaceTypeHandleFromDynamic, ref iid);
+ }
+#endif
+
//
// We are not aggregating and don't have a Type for the iid so we must return null
//