Add Misc types to InteropServices
authorFaizur Rahman <shrah@microsoft.com>
Wed, 26 Oct 2016 00:29:16 +0000 (17:29 -0700)
committerFaizur Rahman <shrah@microsoft.com>
Wed, 26 Oct 2016 19:11:03 +0000 (12:11 -0700)
Add the following types to InteropServices:
- AutomationProxyAttribute
- ComAliasNameAttribute
- ComCompatibleVersionAttribute
- ComConversionLossAttribute
- ComRegisterFunctionAttribute
- ComUnregisterFunctionAttribute
- ICustomFactory
- ICustomMarshaler
- ImportedFromTypeLibAttribute
- LCIDConversionAttribute
- ManagedToNativeComInteropStubAttribute
- PrimaryInteropAssemblyAttribute
- ProgIdAttribute
- TypeLibImportClassAttribute
- TypeLibVersionAttribute

src/mscorlib/model.xml
src/mscorlib/mscorlib.shared.sources.props
src/mscorlib/ref/mscorlib.cs

index 63d048b..130702e 100644 (file)
       <Member MemberType="Property" Name="ErrorCode" />
       <Member Name="get_ErrorCode" />
     </Type>
-    <Type Status="ImplRoot" Name="System.Runtime.InteropServices.LCIDConversionAttribute" Condition="FEATURE_COMINTEROP" />
     <Type Name="System.Runtime.InteropServices.CallingConvention">
       <Member MemberType="Field" Name="value__" />
       <Member MemberType="Field" Name="Winapi" />
     <Type Name="System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute">
       <Member Name="#ctor" />
     </Type>
+    <Type Name="System.Runtime.InteropServices.AutomationProxyAttribute">
+      <Member Name="#ctor(System.Boolean)" />
+      <Member Name="get_Value" />
+      <Member MemberType="Property" Name="Value" />      
+    </Type>
+   <Type Name="System.Runtime.InteropServices.ComAliasNameAttribute">
+      <Member Name="#ctor(System.String)" />
+      <Member Name="get_Value" />
+      <Member MemberType="Property" Name="Value" />      
+    </Type>
+    <Type Name="System.Runtime.InteropServices.ComCompatibleVersionAttribute">
+      <Member Name="#ctor(System.Int32,System.Int32,System.Int32,System.Int32)" />
+      <Member Name="get_MajorVersion" />
+      <Member MemberType="Property" Name="MajorVersion" />      
+      <Member Name="get_MinorVersion" />
+      <Member MemberType="Property" Name="MinorVersion" />      
+      <Member Name="get_BuildNumber" />
+      <Member MemberType="Property" Name="BuildNumber" />      
+      <Member Name="get_RevisionNumber" />
+      <Member MemberType="Property" Name="RevisionNumber" />      
+    </Type>    
+    <Type Name="System.Runtime.InteropServices.ComConversionLossAttribute">
+      <Member Name="#ctor" />
+    </Type>
+    <Type Name="System.Runtime.InteropServices.ComRegisterFunctionAttribute">
+      <Member Name="#ctor" />
+    </Type>
+    <Type Name="System.Runtime.InteropServices.ComUnregisterFunctionAttribute">
+      <Member Name="#ctor" />
+    </Type>
     <Type Name="System.Runtime.InteropServices.ExternalException">
       <Member Name="#ctor" />
       <Member Name="#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
     <Type Name="System.Runtime.InteropServices.ICustomQueryInterface">
       <Member Name="GetInterface(System.Guid@,System.IntPtr@)" />
     </Type>
+    <Type Name="System.Runtime.InteropServices.ICustomFactory">
+      <Member Name="CreateInstance(System.Type)" />
+    </Type>
+    <Type Name="System.Runtime.InteropServices.ImportedFromTypeLibAttribute">
+      <Member Name="#ctor(System.String)" />
+      <Member Name="get_Value" />
+      <Member MemberType="Property" Name="Value" />      
+    </Type>    
     <Type Name="System.Runtime.InteropServices.InAttribute">
       <Member Name="#ctor" />
     </Type>
       <Member MemberType="Field" Name="Sequential" />
       <Member MemberType="Field" Name="value__" />
     </Type>
-    <Type Name="System.Runtime.InteropServices.NativeCallableAttribute">
-      <Member Name="#ctor" />
-      <Member MemberType="Field" Name="CallingConvention" /> <!-- EE -->
-      <Member MemberType="Field" Name="EntryPoint" /> <!-- EE -->
+    <Type Name="System.Runtime.InteropServices.LCIDConversionAttribute">
+      <Member Name="#ctor(System.Int32)" />
+      <Member Name="get_Value" />
+      <Member MemberType="Property" Name="Value" />      
     </Type>
     <Type Name="System.Runtime.InteropServices.Marshal">
       <Member MemberType="Field" Name="SystemDefaultCharSize" />
       <Member MemberType="Field" Name="SafeArraySubType" />
       <Member MemberType="Field" Name="SafeArrayUserDefinedSubType" />
     </Type>
+    <Type Name="System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute">
+      <Member Name="#ctor(System.Type,System.String)" />
+      <Member Name="get_ClassType" />
+      <Member MemberType="Property" Name="ClassType" />      
+      <Member Name="get_MethodName" />
+      <Member MemberType="Property" Name="MethodName" />      
+    </Type>       
     <Type Name="System.Runtime.InteropServices.MarshalDirectiveException" >
       <Member Name="#ctor" />
       <Member Name="#ctor(System.String)" />
       <Member Name="#ctor(System.String,System.Exception)" />
       <Member Name="#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
     </Type>
+    <Type Name="System.Runtime.InteropServices.NativeCallableAttribute">
+      <Member Name="#ctor" />
+      <Member MemberType="Field" Name="CallingConvention" /> <!-- EE -->
+      <Member MemberType="Field" Name="EntryPoint" /> <!-- EE -->
+    </Type>
     <Type Name="System.Runtime.InteropServices.OptionalAttribute">
       <Member Name="#ctor" />
     </Type>
     <Type Name="System.Runtime.InteropServices.PreserveSigAttribute">
       <Member Name="#ctor" />
     </Type>
+    <Type Name="System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute">
+      <Member Name="#ctor(System.Int32,System.Int32)" />
+      <Member Name="get_MajorVersion" />
+      <Member MemberType="Property" Name="MajorVersion" />      
+      <Member Name="get_MinorVersion" />
+      <Member MemberType="Property" Name="MinorVersion" />      
+    </Type>    
+    <Type Name="System.Runtime.InteropServices.ProgIdAttribute">
+      <Member Name="#ctor(System.String)" />
+      <Member Name="get_Value" />
+      <Member MemberType="Property" Name="Value" />      
+    </Type>
     <Type Name="System.Runtime.InteropServices.SafeHandle">
       <Member MemberType="Field" Name="handle" />
       <Member Name="#ctor(System.IntPtr,System.Boolean)" />
       <Member MemberType="Property" Name="IsClosed" />
       <Member MemberType="Property" Name="IsInvalid" />
     </Type>
+   <Type Name="System.Runtime.InteropServices.TypeLibImportClassAttribute">
+      <Member Name="#ctor(System.Type)" />
+      <Member Name="get_Value" />
+      <Member MemberType="Property" Name="Value" />
+    </Type>
+    <Type Name="System.Runtime.InteropServices.TypeLibVersionAttribute">
+      <Member Name="#ctor(System.Int32,System.Int32)" />
+      <Member Name="get_MajorVersion" />
+      <Member MemberType="Property" Name="MajorVersion" />      
+      <Member Name="get_MinorVersion" />
+      <Member MemberType="Property" Name="MinorVersion" />      
+    </Type>       
     <Type Name="System.Runtime.InteropServices.CriticalHandle">
       <Member MemberType="Field" Name="handle" />
       <Member MemberType="Field" Name="_stackTrace" Flavor="chk,dbg" />
       <Member Name="AddField(System.String)" /> <!-- EE -->
       <Member Name="RemoveMember(System.Reflection.MemberInfo)" /> <!-- EE -->
     </Type>
-    <Type Status="ImplRoot" Name="System.Runtime.InteropServices.ICustomMarshaler">
+    <Type Name="System.Runtime.InteropServices.ICustomMarshaler">
       <Member Name="MarshalNativeToManaged(System.IntPtr)" /> <!-- EE -->
       <Member Name="MarshalManagedToNative(System.Object)" /> <!-- EE -->
       <Member Name="CleanUpNativeData(System.IntPtr)" /> <!-- EE -->
index dcd4384..2bb41e3 100644 (file)
     <InteropSources Condition="'$(FeatureCominterop)' != 'true'" Include="$(BclSourcesRoot)\System\Runtime\InteropServices\NonPortable.cs" />
     <InteropSources Condition="'$(FeatureCominterop)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\InteropServices\DispatchWrapper.cs" />
     <InteropSources Condition="'$(FeatureCominterop)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ExtensibleClassFactory.cs" />
-    <InteropSources Condition="'$(FeatureCominterop)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomFactory.cs" />
+    <InteropSources Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomFactory.cs" />
     <InteropSources Condition="'$(FeatureCominterop)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ObjectCreationDelegate.cs" />
   </ItemGroup>
   <ItemGroup Condition="'$(FeatureClassicCominterop)' == 'true'">
index d379edf..27b0d30 100644 (file)
@@ -10382,6 +10382,13 @@ namespace System.Runtime.InteropServices
     {
         public AllowReversePInvokeCallsAttribute() { }
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(1029), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class AutomationProxyAttribute : System.Attribute
+    {
+        public AutomationProxyAttribute(bool val) { }
+        public bool Value { get { throw null; } }
+    }    
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
     public partial struct ArrayWithOffset
@@ -10454,6 +10461,29 @@ namespace System.Runtime.InteropServices
         public CoClassAttribute(System.Type coClass) { }
         public System.Type CoClass { get { throw null; } }
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(10624), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ComAliasNameAttribute : System.Attribute
+    {
+        public ComAliasNameAttribute(String val) { }
+        public String Value { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(1), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ComCompatibleVersionAttribute : System.Attribute
+    {
+        public ComCompatibleVersionAttribute(System.Int32 major, System.Int32 minor, System.Int32 build, System.Int32 revision) { }
+        public System.Int32 MajorVersion { get { throw null; } }
+        public System.Int32 MinorVersion { get { throw null; } }
+        public System.Int32 BuildNumber { get { throw null;} }
+        public System.Int32 RevisionNumber { get { throw null; } }
+    }    
+    [System.AttributeUsageAttribute((System.AttributeTargets)(32767), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ComConversionLossAttribute : Attribute
+    {
+        public ComConversionLossAttribute() { }
+    }
     [System.AttributeUsageAttribute((System.AttributeTargets)(4), Inherited=false)]
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public sealed partial class ComDefaultInterfaceAttribute : System.Attribute
@@ -10508,6 +10538,12 @@ namespace System.Runtime.InteropServices
         PropGet = 1,
         PropSet = 2,
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(64), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ComRegisterFunctionAttribute : Attribute
+    {
+        public ComRegisterFunctionAttribute() { }
+    }
     [System.AttributeUsageAttribute((System.AttributeTargets)(4), Inherited=true)]
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public sealed partial class ComSourceInterfacesAttribute : System.Attribute
@@ -10519,6 +10555,12 @@ namespace System.Runtime.InteropServices
         public ComSourceInterfacesAttribute(System.Type sourceInterface1, System.Type sourceInterface2, System.Type sourceInterface3, System.Type sourceInterface4) { }
         public string Value { get { throw null; } }
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(64), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ComUnregisterFunctionAttribute : Attribute
+    {
+        public ComUnregisterFunctionAttribute() { }
+    }
     [System.AttributeUsageAttribute((System.AttributeTargets)(5597), Inherited=false)]
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public sealed partial class ComVisibleAttribute : System.Attribute
@@ -10690,12 +10732,33 @@ namespace System.Runtime.InteropServices
     {
         object GetUnderlyingObject();
     }
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public partial interface ICustomFactory
+    {
+        MarshalByRefObject CreateInstance(Type serverType);
+    }    
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public partial interface ICustomMarshaler
+    {        
+        object MarshalNativeToManaged(System.IntPtr pNativeData);
+        System.IntPtr MarshalManagedToNative(object ManagedObj);
+        void CleanUpNativeData(System.IntPtr pNativeData);
+        void CleanUpManagedData(object ManagedObj);
+        int GetNativeDataSize();
+    }
     [System.Runtime.InteropServices.ComVisibleAttribute(false)]
     public partial interface ICustomQueryInterface
     {
         [System.Security.SecurityCriticalAttribute]
         System.Runtime.InteropServices.CustomQueryInterfaceResult GetInterface(ref System.Guid iid, out System.IntPtr ppv);
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(1), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ImportedFromTypeLibAttribute : System.Attribute
+    {
+        public ImportedFromTypeLibAttribute(String val) { }
+        public String Value { get { throw null; } }
+    }   
     [System.AttributeUsageAttribute((System.AttributeTargets)(2048), Inherited=false)]
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public sealed partial class InAttribute : System.Attribute
@@ -10733,6 +10796,13 @@ namespace System.Runtime.InteropServices
         Explicit = 2,
         Sequential = 0,
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(64), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class LCIDConversionAttribute : System.Attribute
+    {
+        public LCIDConversionAttribute(System.Int32 val) { }
+        public System.Int32 Value { get { throw null; } }
+    }    
     [System.Security.SecurityCriticalAttribute]
     public static partial class Marshal
     {
@@ -11020,6 +11090,14 @@ namespace System.Runtime.InteropServices
         [System.Security.SecurityCriticalAttribute]
         public static void ZeroFreeGlobalAllocUnicode(System.IntPtr s) { }
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(64), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ManagedToNativeComInteropStubAttribute : System.Attribute
+    {
+        public ManagedToNativeComInteropStubAttribute(System.Type classType, System.String methodName) { }
+        public System.Type ClassType { get { throw null; } }
+        public System.String MethodName { get { throw null; } }
+    }    
     [System.AttributeUsageAttribute((System.AttributeTargets)(10496), Inherited=false)]
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public sealed partial class MarshalAsAttribute : System.Attribute
@@ -11072,6 +11150,21 @@ namespace System.Runtime.InteropServices
     {
         public PreserveSigAttribute() { }
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(1), Inherited=false, AllowMultiple = true)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class PrimaryInteropAssemblyAttribute : System.Attribute
+    {
+        public PrimaryInteropAssemblyAttribute(System.Int32 major, System.Int32 minor) { }
+        public System.Int32 MajorVersion { get { throw null; } }
+        public System.Int32 MinorVersion { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(4), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class ProgIdAttribute : System.Attribute
+    {
+        public ProgIdAttribute(String val) { }
+        public String Value { get { throw null; } }
+    }  
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public partial class SafeArrayRankMismatchException : System.SystemException
     {
@@ -11166,6 +11259,21 @@ namespace System.Runtime.InteropServices
         public string Identifier { get { throw null; } }
         public string Scope { get { throw null; } }
     }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(1024), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class TypeLibImportClassAttribute : System.Attribute
+    {
+        public TypeLibImportClassAttribute(System.Type val) { }
+        public String Value { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute((System.AttributeTargets)(1), Inherited=false)]
+    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
+    public sealed partial class TypeLibVersionAttribute : System.Attribute
+    {
+        public TypeLibVersionAttribute(System.Int32 major, System.Int32 minor) { }
+        public System.Int32 MajorVersion { get { throw null; } }
+        public System.Int32 MinorVersion { get { throw null; } }
+    }
     [System.Runtime.InteropServices.ComVisibleAttribute(true)]
     public sealed partial class UnknownWrapper
     {