How would you/anyone declare this union in a type/structure in VB??
union {
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
goodnite!
Printable View
How would you/anyone declare this union in a type/structure in VB??
union {
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
goodnite!
It's simply UINT. All the member of a union start at the same memory location. In this case, having two UINTs is marginally pointless, and they'd normally be used for things like this:This means that the 64-bit integer quad occupies the same space as the two 32-bit integers low and high. This allows you to easily interpret it as the two parts of the same number.Code:union large_uint {
struct {
unsigned long low;
unsigned long high;
}
unsigned long long quad;
};