◐ Shell
clean mode source ↗

Fix memory leak in `GetFileShares` by xtqqczze · Pull Request #25896 · PowerShell/PowerShell

We have no need to use unsafe context. In original definition LPVOID is used. It is IntPtr in C# or nint.

I suggest using an unmanaged pointer (void*) rather than nint.

LPVOID means "any pointer", not a handle. Mapping it to void* better reflects the native contract, whereas nint is more appropriate for handles or opaque values. This keeps the API surface closer to Win32 and clearer for maintainers.