• Welcome to Valhalla Legends Archive.
 

converting some c++ to vb. need help

Started by Noodlez, December 23, 2002, 08:49 AM

Previous topic - Next topic

Noodlez

ok, i have this structure

typedef struct {
      DWORD      compactsave:1,
                  nodurability:1,
                  useable:1,
                  stackable:1,
                  quest:1,
                  questitem:1,
                  itemclass:2,
                  file:2,
                  range:3,
                  invwidth:2,
                  invheight:3,
                  maxsockets:3,
                  bitfield1:3;
} iteminfoflags_t;

in vb, how would i make an entire Type a long?
i was thinking Dim iteminfoflags_t(1 to 24) as byte, and treating each index as a bit (like for compactsave i would modify iteinfoflags_t(1)) what do you guys think

n00blar

Noodlez I thought you were an elite programmer that wants in valhalla legends =P after all that war3 maphack you made; surely if you can disassemble and find all the offsets you can do this? However, If you want me to help you with my never-ending knowledge then message me on aim and ask-- n00bIar is my screen name!

n00blar

#2
hey you can use the way you want but if you want optimize for memory your gonna have to pack the bits into a byte using a method like the one i described

Grok

#3
Private iteminfoflags_t As Long

Hope this helps.
Grok