Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JsCreateTypedArray

Limin Zhu edited this pageOct 9, 2015 ·1 revision

Creates a Javascript typed array object.

Syntax

STDAPI_(JsErrorCode)    JsCreateTypedArray(    _In_ JsTypedArrayType arrayType,    _In_ JsValueRef baseArray,    _In_ unsigned int byteOffset,    _In_ unsigned int elementLength,    _Out_ JsValueRef *result);

Parameters

  • arrayType: The type of the array to create.
  • baseArray: The base array of the new array. UseJS_INVALID_REFERENCE if no base array.
  • byteOffset: The offset in bytes from the start of baseArray (ArrayBuffer) for result typed array to reference. Only applicable when baseArray is an ArrayBuffer object. Must be 0 otherwise.
  • elementLength: The number of elements in the array. Only applicable when creating a new typed array without baseArray (baseArray isJS_INVALID_REFERENCE) or when baseArray is an ArrayBuffer object. Must be 0 otherwise.
  • result: The new typed array object.

Return Value

The codeJsNoError if the operation succeeded, a failure code otherwise.

Remarks

ThebaseArray can be anArrayBuffer, another typed array, or a JavaScriptArray. The returned typed array will use the baseArray if it is an ArrayBuffer, orotherwise create and use a copy of the underlying source array.Requires an active script context.

Want to contribute to this Wiki?

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp