File tree Expand file tree Collapse file tree 4 files changed +34
-3
lines changed
Microsoft.CSharp/src/ILLink
System.Private.CoreLib/src Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 11<linker >
2- <assembly fullname =" Microsoft.CSharp" >
2+ <assembly fullname =" Microsoft.CSharp" feature = " System.Runtime.InteropServices.BuiltInComInterop.IsSupported " featurevalue = " true " featuredefault = " true " >
33 <!-- Required for COM event dispatch -->
44 <type fullname =" System.Runtime.InteropServices.ComEventsSink" />
55 </assembly >
Original file line number Diff line number Diff line change 8888 </type >
8989 </assembly >
9090
91+ <!-- The following attributes are only necessary when COM is supported -->
92+ <assembly fullname =" System.Private.CoreLib" feature =" System.Runtime.InteropServices.BuiltInComInterop.IsSupported" featurevalue =" false" >
93+ <type fullname =" System.Runtime.InteropServices.ClassInterfaceAttribute" >
94+ <attribute internal =" RemoveAttributeInstances" />
95+ </type >
96+ <type fullname =" System.Runtime.InteropServices.ComDefaultInterfaceAttribute" >
97+ <attribute internal =" RemoveAttributeInstances" />
98+ </type >
99+ <type fullname =" System.Runtime.InteropServices.ComEventInterfaceAttribute" >
100+ <attribute internal =" RemoveAttributeInstances" />
101+ </type >
102+ <type fullname =" System.Runtime.InteropServices.ComSourceInterfacesAttribute" >
103+ <attribute internal =" RemoveAttributeInstances" />
104+ </type >
105+ <type fullname =" System.Runtime.InteropServices.ComVisibleAttribute" >
106+ <attribute internal =" RemoveAttributeInstances" />
107+ </type >
108+ <type fullname =" System.Runtime.InteropServices.DispIdAttribute" >
109+ <attribute internal =" RemoveAttributeInstances" />
110+ </type >
111+ <type fullname =" System.Runtime.InteropServices.InterfaceTypeAttribute" >
112+ <attribute internal =" RemoveAttributeInstances" />
113+ </type >
114+ <type fullname =" System.Runtime.InteropServices.ProgIdAttribute" >
115+ <attribute internal =" RemoveAttributeInstances" />
116+ </type >
117+ </assembly >
118+
91119 <!--
92120 Attributes listed below here should be behind the 'System.AggressiveAttributeTrimming' feature switch, which
93121 is only enabled by default on app models that need as much size savings as possible.
Original file line number Diff line number Diff line change 33
44using System . Reflection ;
55using System . Diagnostics ;
6+ using System . Runtime . InteropServices ;
67using CultureInfo = System . Globalization . CultureInfo ;
78
89namespace System
@@ -227,7 +228,7 @@ public sealed override MethodBase BindToMethod(
227228
228229 if ( ! pCls . IsAssignableFrom ( argTypes [ paramOrder [ i ] [ j ] ] ) )
229230 {
230- if ( argTypes [ paramOrder [ i ] [ j ] ] . IsCOMObject )
231+ if ( Marshal . IsBuiltInComSupported && argTypes [ paramOrder [ i ] [ j ] ] . IsCOMObject )
231232 {
232233 if ( pCls . IsInstanceOfType ( args [ paramOrder [ i ] [ j ] ] ) )
233234 continue ;
@@ -255,7 +256,7 @@ public sealed override MethodBase BindToMethod(
255256
256257 if ( ! paramArrayType . IsAssignableFrom ( argTypes [ j ] ) )
257258 {
258- if ( argTypes [ j ] . IsCOMObject )
259+ if ( Marshal . IsBuiltInComSupported && argTypes [ j ] . IsCOMObject )
259260 {
260261 if ( paramArrayType . IsInstanceOfType ( args [ j ] ) )
261262 continue ;
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ namespace System.Runtime.InteropServices
1010{
1111 public static partial class Marshal
1212 {
13+ internal static bool IsBuiltInComSupported => false ;
14+
1315 public static int GetHRForException ( Exception ? e )
1416 {
1517 return e ? . HResult ?? 0 ;
You can’t perform that action at this time.
0 commit comments