Skip to content

Conversation

@jtschuster
Copy link
Member

Fixes #98049

To align with DllImport behavior, out parameters for LibraryImport and GeneratedComInterface should be default-initialized, never SkipInit'ed

@jtschuster jtschuster changed the title Set out parameters to default instead of using SkipInit Set out parameters to default instead of using SkipInit in Interop generators Apr 15, 2024
@jtschuster jtschuster merged commit aa6dab4 into dotnet:main Apr 16, 2024
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
…generators (dotnet#101076)

* Set `out` parameters to default instead of using SkipInit

* Assert value after P/Invoke
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
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.

[API Proposal]: DefaultInitializeAttribute for out parameters in native marshallers

3 participants