|
-
Jan 17th, 2002, 10:26 PM
#1
Thread Starter
New Member
C++/Structure/unions in Visual basic
How would you/anyone declare this union in a type/structure in VB??
union {
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
goodnite!
-
Jan 20th, 2002, 06:34 AM
#2
Monday Morning Lunatic
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:
Code:
union large_uint {
struct {
unsigned long low;
unsigned long high;
}
unsigned long long quad;
};
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|