Type OSVersionInfoEx Field dwOSVersionInfoSize: Long Field dwMajorVersion:Long Field dwMinorVersion:Long Field dwBuildNumber:Long Field dwPlatformId:Long Field szCSDVersion:Byte[128] Field wServicePackMajor: Int Field wServicePackMinor: Int Field wSuiteMask: Int Field wProductType: Byte Field wReserved: Byte End Type Global VersionInfo:OSVersionInfoEx=New OSVersionInfoEx Print SizeOf(VersionInfo)
It doesn't seem to be counting the 128 bytes in the array. And it's not because the array isn't automatically initiated because it still returns the same value if you add the extra VersionInfo.szCSDVersion=New Byte[128] before calling SizeOf. SizeOf works fine on arrays on their own, just not in objects.