The friendly wrapper for `NetFreeAadJoinInformation()` is pointless.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 124
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
Actual behavior
The generated friendly wrapper for NetFreeAadJoinInformation() is:
internal static unsafe void NetFreeAadJoinInformation([Optional] winmdroot.NetworkManagement.NetManagement.DSREG_JOIN_INFO? pJoinInfo)
{
winmdroot.NetworkManagement.NetManagement.DSREG_JOIN_INFO pJoinInfoLocal = pJoinInfo ?? default(winmdroot.NetworkManagement.NetManagement.DSREG_JOIN_INFO);
PInvoke.NetFreeAadJoinInformation(pJoinInfo.HasValue ? &pJoinInfoLocal : null);
}
Expected behavior
Because this P/Invoke frees pointed to memory, there shouldn't be a friendly wrapper that accepts a dereferenced instance of DSREG_JOIN_INFO.
Repro steps
NativeMethods.txtcontent:
NetFreeAadJoinInformation
-
NativeMethods.jsoncontent (if present): N/A -
Any of your own code that should be shared? N/A
Context
- CsWin32 version: 0.3.264
- Win32Metadata version (if explicitly set by project): N/A
- Target Framework: net472
LangVersion(if explicitly set by project): N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a NativeMethods.txt entry containing NetFreeAadJoinInformation; NativeMethods.json is not needed for the stated repro. Inspect the generated friendly wrapper and the corresponding P/Invoke declaration, then verify that generation keeps the P/Invoke while omitting the pointless dereferenced-struct wrapper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100