Platforms to show: All Mac Windows Linux Cross-Platform

Back to MemoryBlock class.

MemoryBlock.CopyBytesMBS(srcOfs as Integer, numBytes as Integer, destBlk as memoryBlock, destOfs as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MemoryBlock MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Copies the specified amount of bytes into a second memoryBlock.
Example
dim m as MemoryBlock
dim n as MemoryBlock

m=NewMemoryBlock(100)
n=NewMemoryBlock(100)

m.Long(0)=12345

m.CopyBytesMBS(0,4,n,0)

MsgBox str(n.long(0))

You must make sure that the destination block is large enough to hold the copied bytes (if not, your application or even the whole system can crash).

See also:

Some examples using this method:

MemoryBlock.CopyBytesMBS(srcOfs as Integer, numBytes as Integer, destOfs as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MemoryBlock MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Copies the specified amount of bytes inside the memoryBlock.

You must make sure that the copied bytes fit inside the block (if they don't, your application or even the whole system can crash).

See also:

Some examples using this method:

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...