Question

I am trying to figure out what I can use in visual basic .net that would act similar to this http://docs.xojo.com/index.php/MemoryBlock Thank you

Was it helpful?

Solution

You can either use an array Byte() or List(Of Byte), or manipulate memory directly with the System.Runtime.InteropServices.Marshal class's .AllocHGlobal method with IntPtr. Note that VB.NET does not allow for pointer arithmetic like C# does. A common workaround is to use Marshal to copy memory from an address into a Byte array, perform the work there, then copy it back to the original address.

But we need more information about your ultimate intent. I want to avoid an "XY Problem".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top