This sample shows how a VB6 app and a C Sharp app can share binary data by passing memory offsets. (This only applies to code running in the same process.) Address sent from vb as an int using varptr(), in Csharp is it copied with Marshal.Copy, and Marshal.GAlloc to send an address back to vb, where CopyMemory accesses the data.