pub unsafe extern "C" fn napi_create_arraybuffer(
env: napi_env,
byte_length: usize,
data: *mut *mut c_void,
result: *mut napi_value,
) -> napi_statusAvailable on crate feature
napi only.Expand description
Creates an ArkTS ArrayBuffer of the specified size.
§Arguments
-
env- Current running virtual machine context. -
byte_length- The length in bytes of the array buffer. -
data- The byte buffer of the ArrayBuffer. -
result- A napi_value representing an ArkTS ArrayBuffer.
§Returns
- Returns the function execution status.
[
napi_ok] If the function executed successfully.
[napi_invalid_arg] If the param env, data and(or) result is nullptr.
[napi_pending_exception] There is an uncaught exception occurred before(in) execution.
Available since API-level: 10