diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-02-07 19:30:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 19:30:40 -0800 |
commit | 272cc4e755e6ef4570d70b815a03c15c7a9ccc1b (patch) | |
tree | 82b1e031074c54a2e391ed2d4ca9ada04a6d3410 /src/mscorlib/src | |
parent | c35e8dbc37e5380f46553510d0368aad04a677d2 (diff) | |
download | coreclr-272cc4e755e6ef4570d70b815a03c15c7a9ccc1b.tar.gz coreclr-272cc4e755e6ef4570d70b815a03c15c7a9ccc1b.tar.bz2 coreclr-272cc4e755e6ef4570d70b815a03c15c7a9ccc1b.zip |
Add ComVisible(true) back to several special types (#9403)
It is required by WinRT/COM interop. Fixes #9401.
Diffstat (limited to 'src/mscorlib/src')
5 files changed, 14 insertions, 7 deletions
diff --git a/src/mscorlib/src/System/Delegate.cs b/src/mscorlib/src/System/Delegate.cs index 8cb8d11173..fb9dc4b110 100644 --- a/src/mscorlib/src/System/Delegate.cs +++ b/src/mscorlib/src/System/Delegate.cs @@ -16,6 +16,8 @@ namespace System { using System.Diagnostics.Contracts; [Serializable] + [ClassInterface(ClassInterfaceType.AutoDual)] + [System.Runtime.InteropServices.ComVisible(true)] public abstract class Delegate : ICloneable, ISerializable { // _target is the object we will invoke on diff --git a/src/mscorlib/src/System/MulticastDelegate.cs b/src/mscorlib/src/System/MulticastDelegate.cs index eb4d08bcf7..aa3271ceab 100644 --- a/src/mscorlib/src/System/MulticastDelegate.cs +++ b/src/mscorlib/src/System/MulticastDelegate.cs @@ -14,6 +14,7 @@ namespace System using System.Reflection.Emit; [Serializable] + [System.Runtime.InteropServices.ComVisible(true)] public abstract class MulticastDelegate : Delegate { // This is set under 3 circumstances diff --git a/src/mscorlib/src/System/Object.cs b/src/mscorlib/src/System/Object.cs index 421ef14e90..d8d9a0e36c 100644 --- a/src/mscorlib/src/System/Object.cs +++ b/src/mscorlib/src/System/Object.cs @@ -33,6 +33,7 @@ namespace System //This class contains no data and does not need to be serializable [Serializable] [ClassInterface(ClassInterfaceType.AutoDual)] +[System.Runtime.InteropServices.ComVisible(true)] public class Object { // Creates a new instance of an Object. @@ -202,6 +203,7 @@ public class Object [Serializable] [ClassInterface(ClassInterfaceType.AutoDual)] +[System.Runtime.InteropServices.ComVisible(true)] internal class __Canon { } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs index 2fefa3fa14..2d08cab0ee 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs @@ -27,6 +27,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime // // In order to be activatable via the ManagedActivationFactory type, the type must be decorated with either // ActivatableAttribute, or StaticAttribute. + [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] internal sealed class ManagedActivationFactory : IActivationFactory, IManagedActivationFactory { diff --git a/src/mscorlib/src/System/Threading/Tasks/IAsyncCausalityTracerStatics.cs b/src/mscorlib/src/System/Threading/Tasks/IAsyncCausalityTracerStatics.cs index ef699cecce..32efd771a0 100644 --- a/src/mscorlib/src/System/Threading/Tasks/IAsyncCausalityTracerStatics.cs +++ b/src/mscorlib/src/System/Threading/Tasks/IAsyncCausalityTracerStatics.cs @@ -19,15 +19,16 @@ namespace Windows.Foundation.Diagnostics [Guid("50850B26-267E-451B-A890-AB6A370245EE")] [WindowsRuntimeImport] internal interface IAsyncCausalityTracerStatics - { - void TraceOperationCreation(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, string operationName, ulong relatedContext); - void TraceOperationCompletion(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, AsyncCausalityStatus status); - void TraceOperationRelation(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, CausalityRelation relation); - void TraceSynchronousWorkStart(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, CausalitySynchronousWork work); - void TraceSynchronousWorkCompletion(CausalityTraceLevel traceLevel, CausalitySource source, CausalitySynchronousWork work); + { + void TraceOperationCreation(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, string operationName, ulong relatedContext); + void TraceOperationCompletion(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, AsyncCausalityStatus status); + void TraceOperationRelation(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, CausalityRelation relation); + void TraceSynchronousWorkStart(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, CausalitySynchronousWork work); + void TraceSynchronousWorkCompletion(CausalityTraceLevel traceLevel, CausalitySource source, CausalitySynchronousWork work); //These next 2 functions could've been represented as an event except that the EventRegistrationToken wasn't being propagated to WinRT EventRegistrationToken add_TracingStatusChanged(System.EventHandler<TracingStatusChangedEventArgs> eventHandler); - } + void remove_TracingStatusChanged(EventRegistrationToken token); + } [ComImport] [Guid("410B7711-FF3B-477F-9C9A-D2EFDA302DC3")] |