Use a Structure instead of MemoryBlock

In my code I have DIM browser As MemoryBlock = Ptr(me.Handle) and this works just fine, except I have to remember what offset in the MemoryBlock I need to use…

So, I created a structure that has all of the declarations, but how would I go about using it instead of the MemoryBlock?

After you defined the structure as, for example, MyStructure you can do:

dim pt As Ptr = Ptr(me.Handle)
pt.MyStructure.field = something
something = pt.MyStructure.field