Skip to content

Conversation

@jtschuster
Copy link
Member

Builds off of #89139.

Implements AssignOut in unmanaged to managed stubs for parameters that need to be marshaled back to the native caller. The values are marshalled into a local variable, then assigned to the parameter at the end of the method. The local variable is cleaned up in the catch clause before returning, and the parameter value is cleaned up after the try catch before returning successfully.

The code isn't cleaned up, but the diff at https://github.com/jtschuster/GeneratedCode/pull/2/files can help show what the changes do compared to what's in main.

jtschuster and others added 30 commits June 15, 2023 16:34
@ghost
Copy link

ghost commented Jul 21, 2023

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

Builds off of #89139.

Implements AssignOut in unmanaged to managed stubs for parameters that need to be marshaled back to the native caller. The values are marshalled into a local variable, then assigned to the parameter at the end of the method. The local variable is cleaned up in the catch clause before returning, and the parameter value is cleaned up after the try catch before returning successfully.

The code isn't cleaned up, but the diff at https://github.com/jtschuster/GeneratedCode/pull/2/files can help show what the changes do compared to what's in main.

Author: jtschuster
Assignees: -
Labels:

area-System.Runtime.InteropServices

Milestone: -

@jtschuster
Copy link
Member Author

This is going to look a lot different with the new changes coming in, closing this

@jtschuster jtschuster closed this Aug 7, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant