Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address TODO to switch to generated p/invoke #66057

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

elinor-fung
Copy link
Member

Found a few more TODO: [DllImportGenerator] from before the blittable/unmanaged reconciliation.

@ghost
Copy link

ghost commented Mar 2, 2022

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

Issue Details

Found a few more TODO: [DllImportGenerator] from before the blittable/unmanaged reconciliation.

Author: elinor-fung
Assignees: -
Labels:

area-System.Runtime.InteropServices

Milestone: 7.0.0

@elinor-fung
Copy link
Member Author

There are two more that I didn't address here. They would actually use the new CustomTypeMarshaller - figured it would make more sense to wait until after #65591 / we update to match the approved API.

// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable types.
[DllImport(Libraries.WinMM)]
internal static extern MMSYSERR waveOutGetDevCaps(IntPtr uDeviceID, ref WAVEOUTCAPS caps, int cbwoc);

// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we add support for non-blittable struct marshalling.
[DllImport("netapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
internal static extern uint NetUserAdd([MarshalAs(UnmanagedType.LPWStr)]string servername, uint level, ref USER_INFO_1 buf, out uint parm_err);

@elinor-fung
Copy link
Member Author

System.IO.Tests failure is #65791
System.Net.Security.Tests failure is #65455

@elinor-fung elinor-fung merged commit 1abbbb4 into dotnet:main Mar 2, 2022
@elinor-fung elinor-fung deleted the fixGenTodo branch March 2, 2022 19:08
@ghost ghost locked as resolved and limited conversation to collaborators Apr 2, 2022
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.

3 participants