|
-
Sep 13th, 2002, 06:53 AM
#1
Thread Starter
Frenzied Member
Convert C++ struct to VB type...
Hi,
There's this C++ struct that I want to make into a VB type, but it has a syntax that I haven't seen before:
Code:
struct { DWORD BaseMid :8;
What does :8 mean?
Thanks in advance,
Duncan
-
Sep 13th, 2002, 08:15 AM
#2
Frenzied Member
It is a bitfield. Means there are 8 bits (seems a bit odd, if someone wanted 8 bits, they should have used a char).
Z.
-
Sep 13th, 2002, 09:05 AM
#3
Frenzied Member
It's a way to skip over to useful bits. Merrion left off part of the statement.
What I find weird is the 'DWORD' part. Maybe it wasn't skipping over. The problem with DWORD is the sign bit. I would have thought ULONG was more appropriate.
Merrion - you can't do bit fields in VB, you have to OR individual groups of bits, messing with RtlMoveMemory.
-
Sep 13th, 2002, 11:01 AM
#4
Frenzied Member
Originally posted by jim mcnamara
It's a way to skip over to useful bits. Merrion left off part of the statement.
What I find weird is the 'DWORD' part. Maybe it wasn't skipping over. The problem with DWORD is the sign bit. I would have thought ULONG was more appropriate.
Could you explain a bit more on this? I think I have used bitfields all of once =).
Z.
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
|