by IRBMe (22 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (6 Votes)
This is more of a tutorial than a code submission. It shows you how the LONG variable is represented in memory by VB. It also shows you how data types are represented in memory and how to place custom bytes into longs without having to figure out what numeber all 4 bytes would be etc. It uses a simple function to domenstarte this which converts a dotted string IP address to it's long representation (they way it's represented in memory). And to prove it works, you can test it alongside the real API function used to do this. The tutorial is integrated into the commenting. Leave some feedback.
Download CopyMemory example How is memory represented in VB? (3 KB)