Sep 26th, 2012, 08:26 AM
This started as a simple program to show a hex dump of 'safe' memory addresses,
i.e. those returned by VarPtr, StrPtr, VarPtrArray, and an undocumented
After playing with it for a bit, I got interested in how VB stores its variables in memory
and this is the result.
It uses CopyMemory liberally, so if you start tweaking it, be careful and
save your project before running in case you crash VB. (You can select
Tools|Options|Environment and click on Save when program starts.)
The program allows you to examine numeric values, numeric arrays, numeric safe arrays,
string values, string arrays, string safe arrays, and UDTs (Types).
Here's a sample output
**Long variable with value of &H4030201
Start Address: &H0013F8AC Number of Bytes: 16
Base: OS: Hex: Ascii:
0013F8AC 0000 01 02 03 04 40 F9 13 00 10 FA 13 00 01 00 00 00 ....@...........
Click Here to Expand Forum to Full Width
Survey posted by VBForums.