Hi, I don't understand how the size of the structure works. I know that an int has a size of 4 bytes, if I get the size of the struct then I have 4 bytes; a byte has as size of 1 byte, if I get the size of the struct then I have 1 byte. Until here everything seems fine, unless I make a structure with the two elements, the size is 8 bytes; 4+1=5 and not 8. Here is the example : #include <Constants.au3>
Local Const $tagSTRUCT1 = "struct;int var1;endstruct"
Local $tSTRUCT1 = DllStructCreate($tagSTRUCT1)
MsgBox($MB_SYSTEMMODAL, "", "Struct1 Size: " & DllStructGetSize($tSTRUCT1))
Local Const $tagSTRUCT2 = "struct;byte var2;endstruct"
Local $tSTRUCT2 = DllStructCreate($tagSTRUCT2)
MsgBox($MB_SYSTEMMODAL, "", "Struct2 Size: " & DllStructGetSize($tSTRUCT2))
Local Const $tagSTRUCT3 = "struct;int var1;byte var2;endstruct"
Local $tSTRUCT3 = DllStructCreate($tagSTRUCT3)
MsgBox($MB_SYSTEMMODAL, "", "Struct3 Size: " & DllStructGetSize($tSTRUCT3))
Thanks for anyhelp Br, FireFox.