How to fix the mismatch struct size

test123 test123 at gmail.com
Wed May 18 04:08:57 UTC 2022


On Tuesday, 17 May 2022 at 10:05:21 UTC, Tejas wrote:
>
> Maybe `extern(Windows)` can do something?
> Also, maybe useful : 
> https://forum.dlang.org/post/ktntbwppqgbbajpbmrcf@forum.dlang.org

It is extern(C).




On Tuesday, 17 May 2022 at 19:52:23 UTC, Arjan wrote:
> Do you know how this 'c' part is build? Which compiler and 
> compiler flags?

Clang with makefile.

> Than you should be able to 'deduce' the alignment used an 
> possibly the packing of bitfields.

no alignment is settings from C source file.


> Another option is just to figure out the layout at runtime 
> using a on purpose filled struct from 'c' with 'marker 
> patterns' in the struct fields.


sound like a solution, but not how to do this.



More information about the Digitalmars-d mailing list