10-18-2005 08:02 AM
10-19-2005 03:28 AM
10-19-2005 03:51 AM
10-19-2005 10:19 AM
10-20-2005 03:32 PM
I think Visual C (at least in version 6) uses a default alignement of 8 byte. However variables are usually aligned to the lesser of the default alignement or the variable size. So I would hazard that this particular structure actually would take up 5 byte since Visual C will add a fill byte between NrChannels and NrPixels.
@Lycangeek wrote:The DeviceConfigType is a great example of what I mentioned before about the dangers of mapping C structures to LV...typedef struct
{
unsigned char NrChannels; // number of channels
unsigned short NrPixels; // number of pixels
unsigned char Sensor; // Sensortype
} DeviceConfigType;Typically in C/C++, you are going to have the compiler set to a 4-byte alignment (this is the default for 32-bit Windows).
10-21-2005 02:57 AM