Skip to content

Commit 3533ff8

Browse files
Interop doc issues (dotnet#7436)
* Update Marshal.PtrToStructure doc. Fixes dotnet#1024 * Document support is missing on non-Windows and Mono runtime. Fixes dotnet#869 Co-authored-by: Elinor Fung <[email protected]>
1 parent 76b6db3 commit 3533ff8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

xml/System.Runtime.InteropServices/DefaultDllImportSearchPathsAttribute.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
2. Otherwise, if the attribute is applied to the assembly that contains the platform invoke, use the values specified by that instance of the attribute.
6767
6868
3. Otherwise, search the assembly directory and then call the `LoadLibraryEx` function with the `LOAD_WITH_ALTERED_SEARCH_PATH` flag.
69-
69+
70+
This attribute has no effect on non-Windows platforms or the Mono runtime.
7071
]]></format>
7172
</remarks>
7273
<altmember cref="T:System.Runtime.InteropServices.DllImportSearchPath" />

xml/System.Runtime.InteropServices/Marshal.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7316,7 +7316,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
73167316

73177317
## Remarks
73187318
<xref:System.Runtime.InteropServices.Marshal.PtrToStructure%2A> is often necessary in COM interop and platform invoke when structure parameters are represented as an <xref:System.IntPtr?displayProperty=nameWithType> value. You cannot use this overload method with value types.
7319-
7319+
If the `ptr` parameter equals <xref:System.IntPtr.Zero?displayProperty=nameWithType>, `null` will be returned.
73207320
]]></format>
73217321
</remarks>
73227322
<exception cref="T:System.ArgumentException">Structure layout is not sequential or explicit.
@@ -7395,7 +7395,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
73957395

73967396
## Remarks
73977397
<xref:System.Runtime.InteropServices.Marshal.PtrToStructure%2A> is often necessary in COM interop and platform invoke when structure parameters are represented as an <xref:System.IntPtr?displayProperty=nameWithType> value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance.
7398-
7398+
If the `ptr` parameter equals <xref:System.IntPtr.Zero?displayProperty=nameWithType>, `null` will be returned.
73997399

74007400

74017401
## Examples
@@ -7490,7 +7490,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
74907490

74917491
## Remarks
74927492
<xref:System.Runtime.InteropServices.Marshal.PtrToStructure%60%601%28System.IntPtr%29> is often necessary in COM interop and platform invoke when structure parameters are represented as <xref:System.IntPtr?displayProperty=nameWithType> values. You can pass a value type to this method overload.
7493-
7493+
If the `ptr` parameter equals <xref:System.IntPtr.Zero?displayProperty=nameWithType>, `null` will be returned.
74947494
]]></format>
74957495
</remarks>
74967496
<exception cref="T:System.ArgumentException">The layout of <typeparamref name="T" /> is not sequential or explicit.</exception>
@@ -7555,7 +7555,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
75557555

75567556
## Remarks
75577557
<xref:System.Runtime.InteropServices.Marshal.PtrToStructure%60%601%28System.IntPtr%2C%60%600%29> is often necessary in COM interop and platform invoke when structure parameters are represented as <xref:System.IntPtr> values. You cannot use this method overload with value types.
7558-
7558+
If the `ptr` parameter equals <xref:System.IntPtr.Zero?displayProperty=nameWithType>, `null` will be returned.
75597559
]]></format>
75607560
</remarks>
75617561
<exception cref="T:System.ArgumentException">Structure layout is not sequential or explicit.</exception>

0 commit comments

Comments
 (0)