You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -167,7 +167,15 @@ If the object cannot be created and `null` is returned, the call to <xref:System
167
167
<paramname="flags">Flags used to configure the generated interface.</param>
168
168
<summary>Creates a COM representation of the supplied object that can be passed to a non-managed environment.</summary>
169
169
<returns>The generated COM interface that can be passed outside the .NET runtime.</returns>
170
-
<remarks>To be added.</remarks>
170
+
<remarks>
171
+
<formattype="text/markdown"><![CDATA[
172
+
173
+
## Remarks
174
+
175
+
If a COM representation was previously created for the specified `instance` using this <xref:System.Runtime.InteropServices.ComWrappers> instance, the previously created COM interface will be returned. If not, a new one will be created.
@@ -194,7 +202,15 @@ If the object cannot be created and `null` is returned, the call to <xref:System
194
202
<paramname="flags">Flags used to describe the external object.</param>
195
203
<summary>Gets the currently registered managed object or creates a new managed object and registers it.</summary>
196
204
<returns>A managed object associated with the supplied external COM object.</returns>
197
-
<remarks>To be added.</remarks>
205
+
<remarks>
206
+
<formattype="text/markdown"><![CDATA[
207
+
208
+
## Remarks
209
+
210
+
If a managed object was previously created for the specified `externalComObject` using this <xref:System.Runtime.InteropServices.ComWrappers> instance, the previously created object will be returned. If not, a new one will be created.
<paramname="instance">The instance to register.</param>
266
+
<summary>Registers a <seecref="T:System.Runtime.InteropServices.ComWrappers" /> instance to be used as the global instance for marshalling in the runtime.</summary>
267
+
<remarks>
268
+
<formattype="text/markdown"><![CDATA[
269
+
270
+
## Remarks
271
+
272
+
This function can only be called a single time. Subsequent calls to this function will result in a <xref:System.InvalidOperationException> being thrown.
273
+
Scenarios where this global instance may be used are:
274
+
* Usage of COM-related Marshal APIs
275
+
* P/Invokes with COM-related types
276
+
* COM activation
277
+
278
+
]]></format>
279
+
</remarks>
280
+
<exceptioncref="T:System.InvalidOperationException">The method was called more than once.</exception>
252
281
</Docs>
253
282
</Member>
254
283
<MemberMemberName="RegisterForTrackerSupport">
@@ -270,9 +299,20 @@ If the object cannot be created and `null` is returned, the call to <xref:System
<paramname="instance">The instance to register.</param>
303
+
<summary>Registers a <seecref="T:System.Runtime.InteropServices.ComWrappers" /> instance to be used as the global instance for reference tracker support.</summary>
304
+
<remarks>
305
+
<formattype="text/markdown"><![CDATA[
306
+
307
+
## Remarks
308
+
309
+
This function can only be called a single time. Subsequent calls to this function will result in a <xref:System.InvalidOperationException> being thrown.
310
+
Scenarios where this global instance may be used are:
311
+
* Object tracking via the <xref:System.Runtime.InteropServices.CreateComInterfaceFlags.TrackerSupport> and <xref:System.Runtime.InteropServices.CreateObjectFlags.TrackerObject> flags.
312
+
313
+
]]></format>
314
+
</remarks>
315
+
<exceptioncref="T:System.InvalidOperationException">The method was called more than once.</exception>
<TypeSignatureLanguage="C#"Value="public sealed class DynamicInterfaceCastableImplementationAttribute : Attribute" />
3
3
<TypeSignatureLanguage="ILAsm"Value=".class public auto ansi sealed beforefieldinit DynamicInterfaceCastableImplementationAttribute extends System.Attribute" />
<summary>Attribute required by any type that is returned by <seecref="M:System.Runtime.InteropServices.IDynamicInterfaceCastable.GetInterfaceImplementation(System.RuntimeTypeHandle)" />.</summary>
24
+
<remarks>
25
+
<formattype="text/markdown"><![CDATA[
26
+
27
+
## Remarks
28
+
29
+
This attribute is used to enforce policy in the runtime and make <xref:System.Runtime.InteropServices.IDynamicInterfaceCastable> scenarios linker friendly.
<summary>Interface used to participate in a type cast failure.</summary>
15
+
<remarks>
16
+
<formattype="text/markdown"><![CDATA[
17
+
18
+
## Remarks
19
+
20
+
Implementation of this interface on a value type will be ignored. Only non-value types are allowed to participate in a type cast failure through this interface.
<summary>Called during interface dispatch when the given interface type cannot be found in the class's metadata.</summary>
47
+
<returns>The type that should be used to dispatch for <paramrefname="interfaceType" /> on the current object.</returns>
48
+
<remarks>
49
+
<formattype="text/markdown"><![CDATA[
50
+
51
+
## Remarks
52
+
53
+
When this function is called, the cast of this object to the given interface should already have been verified through the `castclass/isinst` instructions.
54
+
The returned type must be an interface type and be marked with the <xref:System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute>. Otherwise, <xref:System.InvalidOperationException> will be thrown.
55
+
56
+
]]></format>
57
+
</remarks>
58
+
<exceptioncref="T:System.InvalidOperationException">The returned type is not an interface type, or it was not marked with the <seecref="T:System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute" />.</exception>
<paramname="throwIfNotImplemented">Indicates if the function should throw an exception instead of returning <seelangword="false" />.</param>
83
+
<summary>Called when an implementing class instance is cast to an interface type that is not contained in the class's metadata.</summary>
84
+
<returns><seelangword="true" /> if this object can be cast to the given interface; otherwise, <seelangword="false" />.</returns>
85
+
<remarks>
86
+
<formattype="text/markdown"><![CDATA[
87
+
88
+
## Remarks
89
+
90
+
This is called if casting this object to the given interface type would otherwise fail. Casting here means the IL `isinst` and `castclass` instructions in the case where they are given an interface type as the target type.
91
+
If `throwIfNotImplemented` is `false`, this function should avoid throwing exceptions. If `throwIfNotImplemented` is `true` and this function returns `false`, then <xref:System.InvalidCastException> will be thrown unless an exception is thrown by the implementation.
<typeparamname="T">The type of the array elements.</typeparam>
604
+
<paramname="array">The array to analyze.</param>
605
+
<summary>Returns a reference to the 0th element of <paramrefname="array" />. If the array is empty, returns a reference to where the 0th element would have been stored. Such a reference may be used for pinning but must never be dereferenced.</summary>
606
606
<returns>To be added.</returns>
607
-
<remarks>To be added.</remarks>
607
+
<remarks>
608
+
<formattype="text/markdown"><![CDATA[
609
+
610
+
## Remarks
611
+
612
+
This method does not perform array variance checks. The caller must manually perform any array variance checks if the caller wishes to write to the returned reference.
613
+
614
+
]]></format>
615
+
</remarks>
616
+
<exceptioncref="T:System.NullReferenceException">
617
+
<paramrefname="array" /> is <seelangword="null" />.</exception>
<summary>Any method marked with <seecref="T:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute" /> can be directly called from native code. The function token can be loaded to a local variable using the <seehref="https://docs.microsoft.com/dotnet/csharp/language-reference/operators/pointer-related-operators#address-of-operator-">address-of</see> operator in C# and passed as a callback to a native method.</summary>
24
+
<remarks>
25
+
<formattype="text/markdown"><![CDATA[
26
+
27
+
## Remarks
28
+
29
+
Methods marked with this attribute have the following restrictions:
30
+
* Method must be marked "static".
31
+
* Must not be called from managed code.
32
+
* Must only have <see href="https://docs.microsoft.com/dotnet/framework/interop/blittable-and-non-blittable-types">blittable</see> arguments.
33
+
34
+
]]></format>
35
+
</remarks>
25
36
</Docs>
26
37
<Members>
27
38
<MemberMemberName=".ctor">
@@ -37,7 +48,7 @@
37
48
</AssemblyInfo>
38
49
<Parameters />
39
50
<Docs>
40
-
<summary>To be added.</summary>
51
+
<summary>Initializes a new <seecref="T:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute" /> instance.</summary>
41
52
<remarks>To be added.</remarks>
42
53
</Docs>
43
54
</Member>
@@ -77,7 +88,7 @@
77
88
<ReturnType>System.String</ReturnType>
78
89
</ReturnValue>
79
90
<Docs>
80
-
<summary>To be added.</summary>
91
+
<summary>Optional. If omitted, no named export is emitted during compilation.</summary>
0 commit comments