create_memory_block_extern_copyT_create_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copy (Operator)

Name

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

Signature

create_memory_block_extern_copy( : : Pointer, Size : MemoryBlockHandle)

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

void CreateMemoryBlockExternCopy(const HTuple& Pointer, const HTuple& Size, HTuple* MemoryBlockHandle)

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

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

static void HOperatorSet.CreateMemoryBlockExternCopy(HTuple pointer, HTuple size, out HTuple memoryBlockHandle)

public HMemoryBlock(IntPtr pointer, int size)

void HMemoryBlock.CreateMemoryBlockExternCopy(IntPtr pointer, int size)

def create_memory_block_extern_copy(pointer: int, size: int) -> HHandle

Description

create_memory_block_extern_copycreate_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copy creates a memory block by copying bytes and returns its handle MemoryBlockHandleMemoryBlockHandleMemoryBlockHandleMemoryBlockHandlememoryBlockHandlememory_block_handle. PointerPointerPointerPointerpointerpointer is a data pointer to the beginning of the memory to be copied. SizeSizeSizeSizesizesize 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 MemoryBlockHandleMemoryBlockHandleMemoryBlockHandleMemoryBlockHandlememoryBlockHandlememory_block_handle, whereas the original memory in PointerPointerPointerPointerpointerpointer that is copied from is not released.

Execution Information

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

PointerPointerPointerPointerpointerpointer (input_control)  pointer HTupleintHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Data pointer of the memory block.

SizeSizeSizeSizesizesize (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Size of the memory block.

MemoryBlockHandleMemoryBlockHandleMemoryBlockHandleMemoryBlockHandlememoryBlockHandlememory_block_handle (output_control)  memory_block HMemoryBlock, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the memory block.

Result

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

Possible Successors

get_memory_block_ptrget_memory_block_ptrGetMemoryBlockPtrGetMemoryBlockPtrGetMemoryBlockPtrget_memory_block_ptr

Alternatives

create_memory_block_externcreate_memory_block_externCreateMemoryBlockExternCreateMemoryBlockExternCreateMemoryBlockExterncreate_memory_block_extern

Module

Foundation