Offer option to replace `struct*` with `IntPtr` rather than abort in AnyCPU due to arch-specific structs
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 124
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
Generating something like WerReportAddDump fails on AnyCPU because the method brings in parameters to structs that vary by CPU architecture. Yet some uses of this API don't need those structs and would prefer to retain their AnyCPU target. They tend to replace these pointers to structs with just IntPtr.
Can CsWin32 automatically fallback from SomeStruct* to IntPtr where SomeStruct or one of its dependencies requires CPU architecture-specific declarations?
Note this wouldn't always make an API generate. Some methods themselves are CPU specific. And some methods may take the struct directly rather than a pointer to one.
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
Start by tracing how CsWin32 handles pointer parameters to architecture-specific structs and their dependencies during generation. Done means eligible struct pointers can fall back to IntPtr for AnyCPU callers, while architecture-specific methods and methods taking structs directly still fail as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100