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:
What does :8 mean?Code:struct { DWORD BaseMid :8;
Thanks in advance,
Duncan
Printable View
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:
What does :8 mean?Code:struct { DWORD BaseMid :8;
Thanks in advance,
Duncan
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.
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.
Could you explain a bit more on this? I think I have used bitfields all of once =).Quote:
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.
Z.