Skip to main content

WasmEdge_MemoryInstanceGetData

Function WasmEdge_MemoryInstanceGetData 

Source
pub unsafe extern "C" fn WasmEdge_MemoryInstanceGetData(
    Cxt: *const WasmEdge_MemoryInstanceContext,
    Data: *mut u8,
    Offset: u64,
    Length: u64,
) -> WasmEdge_Result
Expand description

Copy the data to the output buffer from a memory instance.

\param Cxt the WasmEdge_MemoryInstanceContext. \param [out] Data the output buffer for copied data. \param Offset the data start offset in the memory instance. \param Length the requested data length. If the Offset + Length is larger than the data size in the memory instance, this function will fail.

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error message.