indeed... now I'm wondering what I was looking at when I was converting this...
Keep in mind that whatever you were using for the conversion might (still) be valid. I linked to trunk (current development version) while you might be basing your conversion of another version of the library. Hnece why I asked about which version of the library you are using.
and what makes me think even more, why this even worked? I was able to get the stats.... But I think it just proves that the name of the field doesn't matter, as long as the size is ok. I had fewer fields so it didn't exceed the real size. Anyway,now I corrected it and it's 112 bytes.
It does not have to be the correct size. When bigger you are left with some data that is undetermined when smaller you (the call to the library function) might be overwriting memory that is in use with your program (which is able to lead to all kinds of strange issues, from access violation to other variables declared in your program being overwritten).
The whole point of not using f.e. hard-coded Qword's is that most library headers (and the library itself) are made to work for different platforms. If you hard-code such definitions you make it fail when compiling for another target (not to mention that you never know if f.i. a record field is actually hard-coded by the library to be 32 bit or to change depending on the platform).
Thank you for sharing the order of your uses clause. I had the idea that perhaps the last included unit was overriding some of the earlier unit types (that does not appear to be the case).
BTW good that you are now able to show the same results that I have for the sizes of the records.
another BTW and it is imho. Pascalifying c-headers is all nice and dandy but for initial conversion it is a no-no. There are many c function calls that allow for a pointer to a record to be nil so that the function can act differently. Using var declarations prevent that from ever being possible. If you can't make it work in the basics using the c declarations then it will become a guessing game as of why things fail when using pascalified parameter declarations.
Either way, you would have to choose which path to follow because when I keep posting my suggestions (pure c translation) it will mess with your head when also trying Fred's suggestions (pascalified).
in any way, a pointer to a record structure (in c) is not the same as a var parameter to a pointer to a record (in pascal).
PS: is there any way I can install this library without the need to depend on rust (I really do not want that on my dev machine)