Skip to content

create_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copyT_create_memory_block_extern_copy🔗

Short description🔗

create_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copyT_create_memory_block_extern_copy — Create a memory block from an external pointer by copying.

Signature🔗

create_memory_block_extern_copy( pointer Pointer, integer Size, out memory_block MemoryBlockHandle )void CreateMemoryBlockExternCopy( const HTuple& Pointer, const HTuple& Size, HTuple* MemoryBlockHandle )static void HOperatorSet.CreateMemoryBlockExternCopy( HTuple pointer, HTuple size, out HTuple memoryBlockHandle )def create_memory_block_extern_copy( pointer: int, size: int ) -> HHandle

Herror T_create_memory_block_extern_copy( const Htuple Pointer, const Htuple Size, Htuple* MemoryBlockHandle )

void HMemoryBlock::HMemoryBlock( void* Pointer, Hlong Size )

public HMemoryBlock( IntPtr pointer, int size )

void HMemoryBlock::CreateMemoryBlockExternCopy( void* Pointer, Hlong Size )

void HMemoryBlock.CreateMemoryBlockExternCopy( IntPtr pointer, int size )

Description🔗

create_memory_block_extern_copyCreateMemoryBlockExternCopy creates a memory block by copying bytes and returns its handle MemoryBlockHandlememoryBlockHandlememory_block_handle. Pointerpointerpointer is a data pointer to the beginning of the memory to be copied. Sizesizesize determines the number of bytes to be copied and with that the size of the memory block in bytes. Note that the memory copied by this operator is released when deleting MemoryBlockHandlememoryBlockHandlememory_block_handle, whereas the original memory in Pointerpointerpointer that is copied from is not released.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

Pointerpointerpointer (input_control) pointer → (integer)HTuple (Hlong)HTuple (IntPtr)intHtuple (Hlong)

Data pointer of the memory block.

Sizesizesize (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Size of the memory block.

MemoryBlockHandlememoryBlockHandlememory_block_handle (output_control) memory_block → (handle)HTuple (HHandle)HMemoryBlock, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the memory block.

Result🔗

If the parameters are valid, the operator create_memory_block_extern_copyCreateMemoryBlockExternCopy returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

get_memory_block_ptrGetMemoryBlockPtr, compare_memory_blockCompareMemoryBlock, memory_block_to_imageMemoryBlockToImage, write_memory_blockWriteMemoryBlock

Alternatives

create_memory_block_externCreateMemoryBlockExtern

Module🔗

Foundation