Skip to content

Commit 8ce7ed5

Browse files
committed
System.Runtime.InteropServices docs
1 parent 1455e5b commit 8ce7ed5

17 files changed

+185
-122
lines changed

xml/System.Runtime.InteropServices.Java/ComponentCrossReference.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<ReturnType>System.UIntPtr</ReturnType>
4545
</ReturnValue>
4646
<Docs>
47-
<summary>To be added.</summary>
47+
<summary>Index of the destination group.</summary>
4848
<remarks>To be added.</remarks>
4949
</Docs>
5050
</Member>
@@ -64,7 +64,7 @@
6464
<ReturnType>System.UIntPtr</ReturnType>
6565
</ReturnValue>
6666
<Docs>
67-
<summary>To be added.</summary>
67+
<summary>Index of the source group.</summary>
6868
<remarks>To be added.</remarks>
6969
</Docs>
7070
</Member>

xml/System.Runtime.InteropServices.Java/StronglyConnectedComponent.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
<ReturnType>System.Void**</ReturnType>
4444
</ReturnValue>
4545
<Docs>
46-
<summary>To be added.</summary>
46+
<summary>
47+
<para>Contains pointers to context passed during creation of each GCHandle.</para>
48+
</summary>
4749
<remarks>To be added.</remarks>
4850
</Docs>
4951
</Member>
@@ -63,7 +65,7 @@
6365
<ReturnType>System.UIntPtr</ReturnType>
6466
</ReturnValue>
6567
<Docs>
66-
<summary>To be added.</summary>
68+
<summary>Number of objects in each collection.</summary>
6769
<remarks>To be added.</remarks>
6870
</Docs>
6971
</Member>

xml/System.Runtime.InteropServices.Marshalling/MarshalUsingAttribute.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ This attribute is recognized by the runtime-provided source generators for sourc
3939
]]></format>
4040
</remarks>
4141
<seealso cref="T:System.Runtime.InteropServices.LibraryImportAttribute" />
42+
<seealso cref="T:System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute" />
4243
</Docs>
4344
<Members>
4445
<Member MemberName=".ctor">

xml/System.Runtime.InteropServices.Marshalling/NativeMarshallingAttribute.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ This attribute is recognized by the runtime-provided source generators for sourc
4646
4747
]]></format>
4848
</remarks>
49+
<seealso cref="T:System.Runtime.InteropServices.LibraryImportAttribute" />
50+
<seealso cref="T:System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute" />
4951
</Docs>
5052
<Members>
5153
<Member MemberName=".ctor">

xml/System.Runtime.InteropServices/CollectionsMarshal.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
</Parameter>
5656
</Parameters>
5757
<Docs>
58-
<param name="array">To be added.</param>
59-
<summary>To be added.</summary>
58+
<param name="array">The <see cref="T:System.Collections.BitArray" /> whose backing storage should be viewed.</param>
59+
<summary>Get a <see cref="T:System.Span`1" /> view over a <see cref="T:System.Collections.BitArray" />'s data.</summary>
6060
<returns>To be added.</returns>
61-
<remarks>To be added.</remarks>
61+
<remarks>&lt;para&gt;&lt;para&gt; The &lt;see cref="T:System.Collections.BitArray" /&gt; may have more capacity than is required to store the number of bits represented by &lt;see cref="P:System.Collections.BitArray.Length" /&gt;. The returned span's &lt;see cref="P:System.Span`1.Length" /&gt; will be the smallest number of bytes capable of representing that length. If the &lt;see cref="T:System.Collections.BitArray" /&gt;'s length is not evenly divisible by 8, the last byte of the span may contain extraneous bits that do not represent elements in the &lt;see cref="T:System.Collections.BitArray" /&gt;.&lt;/para&gt;&lt;para&gt;These may be ignored.&lt;/para&gt;&lt;para&gt;&lt;/para&gt;&lt;para&gt; The length of the &lt;see cref="T:System.Collections.BitArray" /&gt; should not be changed while the resulting &lt;see cref="T:System.Span`1" /&gt; is in use. After such a change, the span may no longer refer to the &lt;see cref="T:System.Collections.BitArray" /&gt;'s backing storage.&lt;/para&gt;&lt;para&gt;&lt;/para&gt;</remarks>
6262
</Docs>
6363
</Member>
6464
<Member MemberName="AsSpan&lt;T&gt;">

xml/System.Runtime.InteropServices/ComWrappers.xml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,16 @@ If the object cannot be created and `null` is returned, the call to <xref:System
188188
<Parameter Name="wrapperFlags" Type="System.Runtime.InteropServices.CreatedWrapperFlags" RefType="out" Index="3" FrameworkAlternate="net-10.0" />
189189
</Parameters>
190190
<Docs>
191-
<param name="externalComObject">To be added.</param>
192-
<param name="flags">To be added.</param>
193-
<param name="userState">To be added.</param>
194-
<param name="wrapperFlags">To be added.</param>
195-
<summary>To be added.</summary>
196-
<returns>To be added.</returns>
197-
<remarks>To be added.</remarks>
191+
<param name="externalComObject">Object to import for usage into the .NET runtime.</param>
192+
<param name="flags">Flags used to describe the external object.</param>
193+
<param name="userState">User state provided by the call to <see cref="M:System.Runtime.InteropServices.ComWrappers.GetOrCreateObjectForComInstance(System.IntPtr,System.Runtime.InteropServices.CreateObjectFlags,System.Object)" />.</param>
194+
<param name="wrapperFlags">Flags used to describe the created wrapper object.</param>
195+
<summary>Create a managed object for the object pointed at by <paramref name="externalComObject" /> respecting the values of <paramref name="flags" />.</summary>
196+
<returns>Returns a managed object associated with the supplied external COM object.</returns>
197+
<remarks>
198+
<para>The default implementation throws <see cref="T:System.NotImplementedException" />.</para>
199+
<para>If the object cannot be created and <code>null</code> is returned, the call to <see cref="M:System.Runtime.InteropServices.ComWrappers.GetOrCreateObjectForComInstance(System.IntPtr,System.Runtime.InteropServices.CreateObjectFlags,System.Object)" /> will throw a <see cref="T:System.ArgumentNullException" />.</para>
200+
</remarks>
198201
</Docs>
199202
</Member>
200203
<Member MemberName="GetIUnknownImpl">
@@ -350,12 +353,15 @@ If a managed object was previously created for the specified `externalComObject`
350353
</Parameter>
351354
</Parameters>
352355
<Docs>
353-
<param name="externalComObject">To be added.</param>
354-
<param name="flags">To be added.</param>
355-
<param name="userState">To be added.</param>
356-
<summary>To be added.</summary>
357-
<returns>To be added.</returns>
358-
<remarks>To be added.</remarks>
356+
<param name="externalComObject">Object to import for usage into the .NET runtime.</param>
357+
<param name="flags">Flags used to describe the external object.</param>
358+
<param name="userState">A state object to use to help create the wrapping .NET object.</param>
359+
<summary>Get the currently registered managed object or creates a new managed object and registers it.</summary>
360+
<returns>Returns a managed object associated with the supplied external COM object.</returns>
361+
<remarks>
362+
<para>If a managed object was previously created for the specified <paramref name="externalComObject" /> using this <see cref="T:System.Runtime.InteropServices.ComWrappers" /> instance, the previously created object will be returned.</para>
363+
<para>If not, a new one will be created.</para>
364+
</remarks>
359365
</Docs>
360366
</Member>
361367
<Member MemberName="GetOrRegisterObjectForComInstance">

xml/System.Runtime.InteropServices/CreatedWrapperFlags.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</Attribute>
2020
</Attributes>
2121
<Docs>
22-
<summary>To be added.</summary>
22+
<summary>Enumeration of flags for <see cref="M:System.Runtime.InteropServices.ComWrappers.CreateObject(System.IntPtr,System.Runtime.InteropServices.CreateObjectFlags,System.Object,System.Runtime.InteropServices.CreatedWrapperFlags@)" />.</summary>
2323
<remarks>To be added.</remarks>
2424
</Docs>
2525
<Members>
@@ -60,7 +60,7 @@
6060
</ReturnValue>
6161
<MemberValue>2</MemberValue>
6262
<Docs>
63-
<summary>To be added.</summary>
63+
<summary>The managed object doesn't keep the native object alive. It represents an equivalent value.</summary>
6464
</Docs>
6565
</Member>
6666
<Member MemberName="TrackerObject">
@@ -80,7 +80,7 @@
8080
</ReturnValue>
8181
<MemberValue>1</MemberValue>
8282
<Docs>
83-
<summary>To be added.</summary>
83+
<summary>Indicate if the supplied external COM object implements the <see href="https://learn.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/nn-windows-ui-xaml-hosting-referencetracker-ireferencetracker">IReferenceTracker</see>.</summary>
8484
</Docs>
8585
</Member>
8686
</Members>

xml/System.Runtime.InteropServices/GCHandle.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@
103103
]]></format>
104104
</remarks>
105105
<altmember cref="T:System.Runtime.InteropServices.GCHandleType" />
106+
<seealso cref="T:System.Runtime.InteropServices.GCHandle`1" />
107+
<seealso cref="T:System.Runtime.InteropServices.PinnedGCHandle`1" />
108+
<seealso cref="T:System.Runtime.InteropServices.WeakGCHandle`1" />
106109
</Docs>
107110
<Members>
108111
<Member MemberName="AddrOfPinnedObject">

xml/System.Runtime.InteropServices/GCHandleExtensions.xml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Provides extension methods to operate with GC handles.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -59,10 +59,13 @@
5959
</Parameters>
6060
<Docs>
6161
<typeparam name="T">To be added.</typeparam>
62-
<param name="handle">To be added.</param>
63-
<summary>To be added.</summary>
64-
<returns>To be added.</returns>
62+
<param name="handle">The handle to retrieve pointer from.</param>
63+
<summary>Retrieves the address of array data in <paramref name="handle" />.</summary>
64+
<returns>
65+
<para>The address of 0th array element the pinned array, or <see langword="null" /> if the handle doesn't point to any object.</para>
66+
</returns>
6567
<remarks>To be added.</remarks>
68+
<exception cref="T:System.NullReferenceException">If the handle is not initialized or already disposed.</exception>
6669
</Docs>
6770
</Member>
6871
<Member MemberName="GetAddressOfStringData">
@@ -89,10 +92,13 @@
8992
<Parameter Name="handle" Type="System.Runtime.InteropServices.PinnedGCHandle&lt;System.String&gt;" RefType="this" />
9093
</Parameters>
9194
<Docs>
92-
<param name="handle">To be added.</param>
93-
<summary>To be added.</summary>
94-
<returns>To be added.</returns>
95+
<param name="handle">The handle to retrieve pointer from.</param>
96+
<summary>Retrieves the address string data in <paramref name="handle" />.</summary>
97+
<returns>
98+
<para>The address of 0th character of the pinned <see cref="T:System.String" />, or <see langword="null" /> if the handle doesn't point to any object.</para>
99+
</returns>
95100
<remarks>To be added.</remarks>
101+
<exception cref="T:System.NullReferenceException">If the handle is not initialized or already disposed.</exception>
96102
</Docs>
97103
</Member>
98104
</Members>

xml/System.Runtime.InteropServices/GCHandle`1.xml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
</Attribute>
4141
</Attributes>
4242
<Docs>
43-
<typeparam name="T">To be added.</typeparam>
44-
<summary>To be added.</summary>
45-
<remarks>To be added.</remarks>
43+
<typeparam name="T">The type of the object this <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> tracks to.</typeparam>
44+
<summary>
45+
<para>Represents a strongly-typed GC handle to a managed object.</para>
46+
<para>A GC handle is used to work with object references in unmanaged code.</para>
47+
</summary>
48+
<remarks>&lt;para&gt;&lt;para&gt;This type corresponds to &lt;see cref="F:System.Runtime.InteropServices.GCHandleType.Normal" /&gt;.&lt;/para&gt;&lt;para&gt; This type is unsafe if used incorrectly. Incorrect usage like mismanagement of lifetime, providing invalid handle value or concurrent disposal can result in hard to diagnose crashes or data corruptions.&lt;/para&gt;&lt;para&gt;&lt;/para&gt;</remarks>
49+
<seealso cref="T:System.Runtime.InteropServices.GCHandle" />
4650
</Docs>
4751
<Members>
4852
<Member MemberName=".ctor">
@@ -61,8 +65,8 @@
6165
<Parameter Name="target" Type="T" />
6266
</Parameters>
6367
<Docs>
64-
<param name="target">To be added.</param>
65-
<summary>To be added.</summary>
68+
<param name="target">The object that uses the <see cref="T:System.Runtime.InteropServices.GCHandle`1" />.</param>
69+
<summary>Allocates a handle for the specified object.</summary>
6670
<remarks>To be added.</remarks>
6771
</Docs>
6872
</Member>
@@ -87,7 +91,7 @@
8791
<Parameters />
8892
<Docs>
8993
<summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
90-
<remarks>To be added.</remarks>
94+
<remarks>This method is not thread safe.</remarks>
9195
</Docs>
9296
</Member>
9397
<Member MemberName="Equals">
@@ -126,6 +130,7 @@
126130
<summary>To be added.</summary>
127131
<returns>To be added.</returns>
128132
<remarks>To be added.</remarks>
133+
<inheritdoc />
129134
</Docs>
130135
</Member>
131136
<Member MemberName="Equals">
@@ -168,6 +173,7 @@
168173
<returns>
169174
<see langword="true" /> if the current object is equal to the <paramref name="other" /> parameter; otherwise, <see langword="false" />.</returns>
170175
<remarks>To be added.</remarks>
176+
<inheritdoc cref="M:System.IEquatable`1.Equals(`0)" />
171177
</Docs>
172178
</Member>
173179
<Member MemberName="FromIntPtr">
@@ -195,10 +201,10 @@
195201
<Parameter Name="value" Type="System.IntPtr" />
196202
</Parameters>
197203
<Docs>
198-
<param name="value">To be added.</param>
199-
<summary>To be added.</summary>
200-
<returns>To be added.</returns>
201-
<remarks>To be added.</remarks>
204+
<param name="value">An <see cref="T:System.IntPtr" /> handle to a managed object to create a <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> object from.</param>
205+
<summary>Returns a new <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> object created from a handle to a managed object.</summary>
206+
<returns>A new <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> object that corresponds to the value parameter.</returns>
207+
<remarks>&lt;para&gt;&lt;para&gt;This method doesn't validate the provided handle value. The caller must ensure the validity of the handle.&lt;/para&gt;&lt;para&gt; The &lt;see cref="T:System.IntPtr" /&gt; representation of &lt;see cref="T:System.Runtime.InteropServices.GCHandle`1" /&gt; is not interchangable with &lt;see cref="T:System.Runtime.InteropServices.GCHandle" /&gt;.&lt;/para&gt;&lt;para&gt;&lt;/para&gt;</remarks>
202208
</Docs>
203209
</Member>
204210
<Member MemberName="GetHashCode">
@@ -224,8 +230,8 @@
224230
</ReturnValue>
225231
<Parameters />
226232
<Docs>
227-
<summary>To be added.</summary>
228-
<returns>To be added.</returns>
233+
<summary>Returns the hash code for the current instance.</summary>
234+
<returns>A hash code for the current instance.</returns>
229235
<remarks>To be added.</remarks>
230236
</Docs>
231237
</Member>
@@ -251,7 +257,7 @@
251257
<ReturnType>System.Boolean</ReturnType>
252258
</ReturnValue>
253259
<Docs>
254-
<summary>To be added.</summary>
260+
<summary>Determine whether this handle has been allocated or not.</summary>
255261
<value>To be added.</value>
256262
<remarks>To be added.</remarks>
257263
</Docs>
@@ -282,9 +288,10 @@
282288
<ReturnType>T</ReturnType>
283289
</ReturnValue>
284290
<Docs>
285-
<summary>To be added.</summary>
291+
<summary>Gets or sets the object this handle represents.</summary>
286292
<value>To be added.</value>
287293
<remarks>To be added.</remarks>
294+
<exception cref="T:System.NullReferenceException">If the handle is not initialized or already disposed.</exception>
288295
</Docs>
289296
</Member>
290297
<Member MemberName="ToIntPtr">
@@ -313,10 +320,12 @@
313320
</Parameter>
314321
</Parameters>
315322
<Docs>
316-
<param name="value">To be added.</param>
317-
<summary>To be added.</summary>
318-
<returns>To be added.</returns>
319-
<remarks>To be added.</remarks>
323+
<param name="value">A <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> object to retrieve an internal integer representation from.</param>
324+
<summary>Returns the internal integer representation of a <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> object.</summary>
325+
<returns>An <see cref="T:System.IntPtr" /> object that represents a <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> object.</returns>
326+
<remarks>
327+
<para>The <see cref="T:System.IntPtr" /> representation of <see cref="T:System.Runtime.InteropServices.GCHandle`1" /> is not interchangable with <see cref="T:System.Runtime.InteropServices.GCHandle" />.</para>
328+
</remarks>
320329
</Docs>
321330
</Member>
322331
</Members>

0 commit comments

Comments
 (0)