Hi Dave,
that looks fine to me, it conforms to what
http://pinvoke.net/[
^] has, which is not a 100% guarantee.
All leaf elements are naturally aligned (i.e. assuming the origin is zero, all 4-byte quantities start at multiples of 4, etc), which is good for performance, and necessary on some processors (most RISC processors; not the IA-32 and IA-64 except for the SIMD units IIRC).
The overall size is
4+one of(4,4,4,4,8,4)
hence 12; but then it does not have to be anything special; it is wise to make the overall length a multiple of the largest leaf element, which is OK here. So even when having an unpadded array of such things, all leaf elements are still naturally aligned.
FYI: there are some Win32 structs with length 6 (a short and an int), and API functions taking unpadded arrays of them. All that really matters is all parties agreeing, which means the field offsets, paddings, pragma's, compiler switches have to be compatible.
PS: what is keeping you from trying this? or should I ask: what is the real problem?
:)
Thanks Luc,
I don't currently have any of my gear hooked up to my 64-bit machine. I've run a few sample tests with SW based devices and it all seemed OK.
There are always cases in the real world where things don't behave as they do in the test environment (especially HW) and I just wanted to be sure that it wasn't probable that some 64bit driver for HW unknown to me would object to this not being a multiple of 8 bytes.
Thanks for your time :thumbsup: :beer: