Platforms to show: All Mac Windows Linux Cross-Platform

Back to DispatchDataMBS class.

DispatchDataMBS.Concat(other as DispatchDataMBS) as DispatchDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new dispatch data object representing the concatenation of the specified data objects.
Example
Var m1 As MemoryBlock = "Hello"
Var m2 As MemoryBlock = "World"

Var d1 As New DispatchDataMBS(m1)
Var d2 As New DispatchDataMBS(m2)

Var d As DispatchDataMBS = d1.Concat(d2)
Var m As MemoryBlock = d.CopyData

// shows HelloWorld
MessageBox m.StringValue(0, m.size)

Those objects may be released by the application after the call returns (however, the system might not deallocate the memory region(s) described by them until the newly created object has also been released).

DispatchDataMBS.Constructor(data as DispatchDataMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The copy constructor.

Creates a new Xojo object referencing the same dispatch data.

See also:

DispatchDataMBS.Constructor(data as MemoryBlock, copy as boolean = false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a dispatch data object from the given contiguous buffer of memory.

If copy is true, we make a copy of the content of the MemoryBlock.
If copy is false, we reference the MemoryBlock to avoid the copy.

See also:

DispatchDataMBS.Constructor(data as Ptr, Length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a new data object with the given memory.

If there is a parent object for the MemoryBlock, you can store it in ReferencedMemory property or any other thing in the tag property.

See also:

DispatchDataMBS.CopyData as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a copy of the data into a new MemoryBlock.

DispatchDataMBS.SubRange(offset as UInt64, length as UInt64) as DispatchDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a smaller data object for a given range.

Returns a new dispatch data object representing a subrange of the specified data object, which may be released by the application after the call returns (however, the system might not deallocate the memory region(s) described by that object until the newly created object has also been released).

offset: The offset into the data object where the subrange starts.
length: The length of the range.

Returns a newly created object representing the specified subrange of the data object.

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


The biggest plugin in space...