You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace calls to Marshal.PtrToStringUni methods with Utf16StringMarshaller #118988
Replace calls to Marshal.PtrToStringUni and Marshal.StringToCoTaskMemUni with calls of equivalent methods on Utf16StringMarshaller throughout the repository.
Improve type consistency by updating method signatures and fields to use ushort* instead of IntPtr for UTF-16 string pointers, removing unnecessary (IntPtr) casts.
Add unsafe modifiers to fix unsafe context issues when using unmanaged pointers as appropriate.
Hi, I’d like to pick this up since the Copilot PR (#118997) was closed.
As @jkotas pointed out there, most of this code is Windows-specific. I’ve already built the runtime on my Windows machine.
I’m planning to go area by area with small PRs, starting with System.Net.NameResolution. For example, ai_canonname is declared as sbyte* in AddressInfo and as IntPtr in AddressInfoEx, while it is a PWSTR (a pointer to a UTF-16 string) in both native structs, so both can become ushort*.
Activity
dotnet-policy-service commentedon Aug 22, 2025
Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.
BekAllaev commentedon Nov 18, 2026
Hi, I’d like to pick this up since the Copilot PR (#118997) was closed.
As @jkotas pointed out there, most of this code is Windows-specific. I’ve already built the runtime on my Windows machine.
I’m planning to go area by area with small PRs, starting with
System.Net.NameResolution. For example,ai_canonnameis declared assbyte*inAddressInfoand asIntPtrinAddressInfoEx, while it is aPWSTR(a pointer to a UTF-16 string) in both native structs, so both can becomeushort*.If that works, I’ll open a PR.