-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken struct definition for MODULEENTRY32
#597
Comments
These two fields should be fixed-length inline arrays. |
It only repros for me when |
Ah, you're right, I forgot to include that I have that set, sorry. |
Not a big problem. I kinda accidentally repro'd it once, then it disappeared, so I was able to figure it out. Thanks for the report. I'll get it fixed. |
@AArnott any chance a release with this fix could be pushed soon-ish? I keep running into this in various structs and it's getting harder and harder to work around - structs with inline arrays in the middle, for example, are almost impossible to work with. |
@alexrp 0.2.10-beta is going to nuget.org now. |
I can confirm the fix works on my end as well. Thanks! |
Actual behavior
The
szModule
andszExePath
fields are completely wrong and will lead to a failedModule32First
call when thedwSize
field is set toUnsafe.SizeOf<MODULEENTRY32>()
.Expected behavior
https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/ns-tlhelp32-moduleentry32
Repro steps
NativeMethods.txt
content:Context
net7.0
LangVersion
(if explicitly set by project): latestThe text was updated successfully, but these errors were encountered: