CreateTypedArray

HRESULT CreateTypedArray(buffer: [in] VARIANT, length: [in] long, result: [out, retval] I_DOCBUILDER_VALUE**)

Description

Creates a Uint8Array value, an analogue of Uint8Array in JS.

Please note, that for the .docbuilder file the CDocBuilderContext.CreateTypedArray method is not used.

Parameters

bufferVARIANT
The array buffer.
lengthlong
The array length.
The returned typed array.

Example

COM

CoInitialize(NULL);
IONLYOFFICEDocBuilder* oBuilder = NULL;
IONLYOFFICEDocBuilderContext* oContext = NULL;
IONLYOFFICEDocBuilderValue* oArr = NULL;
CComSafeArray<BYTE> arr;
arr.Add(1);
oBuilder->Initialize();
oBuilder->GetContext(&oContext);
oContext->CreateTypedArray(ATL::CComVariant(arr), 1, &oArr);
oBuilder->Dispose();

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).