rewolf-wow64ext icon indicating copy to clipboard operation
rewolf-wow64ext copied to clipboard

Some structures' addresses refered by some NtFuncs need to be aligned to 8 bytes, how to solve it

Open RicardoMilos opened this issue 5 years ago • 2 comments

For instance, the arguments to NtCreateFile include a pointer to struct OBJECT_ATTRIBUTE and a pointer to struct IO_STATUS_BLOCK, when I prepare these structs before x64call without modifying esp, NtCreateFile will return STATUS_DATATYPE_MISALIGNMENT or STATUS_INVALID_PARAMETER if esp ≡ 4(mod 8). So I have to wrap NtCreateFile32 with full inline assembly. Quite inconvenient for me. Is there an alternative to fix this issue?

RicardoMilos avatar Jun 06 '19 11:06 RicardoMilos

Exact same issue here... I cannot get it to work properly.

Mecanik avatar Dec 29 '19 11:12 Mecanik

https://en.cppreference.com/w/c/keyword/_Alignas

https://en.cppreference.com/w/c/language/_Alignas

NN--- avatar Feb 29 '20 08:02 NN---