I'm having a problem when I integrated a VB program with a C++ DLL i made....
In the VB program I made a byte array of about 3 MBytes, and I pass the array to the DLL, the problem is that the program crashes when the function in the DLL makes changes to the data in the array... and after some testing (copy-ing the data into another array) i saw gaps in the array... so my conclusion is that the memory allocation in VB is not always linear...

So... my questions are:
Is memory allocation is VB always linear ?
How does vb allocate memory ?