pinvoke icon indicating copy to clipboard operation
pinvoke copied to clipboard

IMAGE_OPTIONAL_HEADER incorrect

Open DysfunctionaI opened this issue 3 years ago • 1 comments

IMAGE_OPTIONAL_HEADER

The layout difference between 32 and 64 bit images can't be fixed with UIntPtr. 64bit images don't have the BaseOfData field, and possibly other things that make the "sequential" layout invalid.

https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#optional-header-image-only (see the table: Offset/Size/Header part/Description)

DysfunctionaI avatar Nov 25 '21 08:11 DysfunctionaI

Thank you for the report. Have you tried https://www.nuget.org/packages/microsoft.windows.cswin32 to see if it suits your needs?

AArnott avatar Nov 25 '21 14:11 AArnott