Refactor all Win32 API references with CsWin32 PInvoke code generator (work in progress) #351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the inception of gsudo, the number of Win32 Api calls utilized by gsudo has significantly increased. I did not anticipate such growth, resulting in rather convoluted code for these Api references.
Once I learn about the
CsWin32 PInvoke code generator
, I thought that using it would be a great way to solve that problem and reduce the source.But, this effort requires much more modifications and time than anticipated. CsWin32 forces API references with a certain signature, which requires additional steps to handle unsafe code, pointers, low level strings, etc. I don't have the time to complete this effort, and the benefits of making this huge change, are relative. I would like a cleaner code base, but not at the cost of not being able to focus on other issues.
I may came back to this branch when I have time, but, that may not happen very soon.