the wrapper in sample code uses byte[] as output, however, this returns only the first element of the native storage. should use IntPtr as it's actually a pointer. I've changed it in my library to get the actual data.
same issue in JsGetTypedArrayStorage and JsGetDataViewStorage
Original: internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out byte[] data, out uint bufferLength);
Modified: internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out IntPtr data, out uint bufferLength);
the wrapper in sample code uses byte[] as output, however, this returns only the first element of the native storage. should use IntPtr as it's actually a pointer. I've changed it in my library to get the actual data. same issue in JsGetTypedArrayStorage and JsGetDataViewStorage
Original:
internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out byte[] data, out uint bufferLength);
Modified:
internal static extern JavaScriptErrorCode JsGetArrayBufferStorage(JavaScriptValue arrayBuffer, out IntPtr data, out uint bufferLength);