Skip to content

Commit 3f41436

Browse files
authored
Update how-to-marshal-strings-using-pinvoke.md
changed sentence per review
1 parent 009b020 commit 3f41436

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/dotnet/how-to-marshal-strings-using-pinvoke.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ As with functions that use only intrinsic data types, <xref:System.Runtime.Inter
1515

1616
The marshaler wraps the call to the unmanaged function in a hidden wrapper routine that pins and copies the managed string into a locally allocated string in the unmanaged context, which then is passed to the unmanaged function. When the unmanaged function returns, the wrapper either deletes the resource, or if it was on the stack, it is reclaimed when the wrapper goes out of scope. The unmanaged function is not responsible for this memory. The unmanaged code only creates and deletes memory in the heap set up by its own CRT, so there is never an issue with the marshaller using a different CRT version.
1717

18-
If your unmanaged function returns a string, either as a return value or an out parameter, the marshaler copies the memory into a new managed string, and then releases it. For more information, see [Default Marshaling Behavior](/dotnet/framework/interop/default-marshaling-behavior) and [Marshaling Data with Platform Invoke](/dotnet/framework/interop/marshaling-data-with-platform-invoke).
18+
If your unmanaged function returns a string, either as a return value or an out parameter, the marshaler copies it into a new managed string, and then releases the memory. For more information, see [Default Marshaling Behavior](/dotnet/framework/interop/default-marshaling-behavior) and [Marshaling Data with Platform Invoke](/dotnet/framework/interop/marshaling-data-with-platform-invoke).
1919

2020
## Example
2121

0 commit comments

Comments
 (0)