From 5aac6d3693720741869189a55fdbd1dbb4cb4382 Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Thu, 25 Nov 2021 20:08:55 -0800 Subject: [PATCH 1/3] Update Marshal.PtrToStructure doc. Fixes #1024 --- xml/System.Runtime.InteropServices/Marshal.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml index 691ef89f476..9a48778a9a0 100644 --- a/xml/System.Runtime.InteropServices/Marshal.xml +++ b/xml/System.Runtime.InteropServices/Marshal.xml @@ -7316,7 +7316,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. - + If equals , will be returned. ]]> Structure layout is not sequential or explicit. @@ -7395,7 +7395,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. - + If equals , will be returned. ## Examples @@ -7490,7 +7490,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. - + If equals , will be returned. ]]> The layout of is not sequential or explicit. @@ -7555,7 +7555,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. - + If equals , will be returned. ]]> Structure layout is not sequential or explicit. From 26a6131e68fe6a38c2a521468ff9cac17ba654ce Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Mon, 29 Nov 2021 10:46:03 -0800 Subject: [PATCH 2/3] Document support is missing on non-Windows and Mono runtime. Fixes https://github.com/dotnet/dotnet-api-docs/issues/869 --- .../DefaultDllImportSearchPathsAttribute.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DefaultDllImportSearchPathsAttribute.xml b/xml/System.Runtime.InteropServices/DefaultDllImportSearchPathsAttribute.xml index 189892f9730..940601c7699 100644 --- a/xml/System.Runtime.InteropServices/DefaultDllImportSearchPathsAttribute.xml +++ b/xml/System.Runtime.InteropServices/DefaultDllImportSearchPathsAttribute.xml @@ -66,7 +66,8 @@ 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. 3. Otherwise, search the assembly directory and then call the `LoadLibraryEx` function with the `LOAD_WITH_ALTERED_SEARCH_PATH` flag. - + + This attribute has no effect on non-Windows platforms or the Mono runtime. ]]> From df0fea3c04d4570542dbd1be902266b163fadfae Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Wed, 1 Dec 2021 13:53:05 -0800 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Elinor Fung --- xml/System.Runtime.InteropServices/Marshal.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml index 9a48778a9a0..11f486298c3 100644 --- a/xml/System.Runtime.InteropServices/Marshal.xml +++ b/xml/System.Runtime.InteropServices/Marshal.xml @@ -7316,7 +7316,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. - If equals , will be returned. + If the `ptr` parameter equals , `null` will be returned. ]]> Structure layout is not sequential or explicit. @@ -7395,7 +7395,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. - If equals , will be returned. + If the `ptr` parameter equals , `null` will be returned. ## Examples @@ -7490,7 +7490,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. - If equals , will be returned. + If the `ptr` parameter equals , `null` will be returned. ]]> The layout of is not sequential or explicit. @@ -7555,7 +7555,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. - If equals , will be returned. + If the `ptr` parameter equals , `null` will be returned. ]]> Structure layout is not sequential or explicit.