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 theCDocBuilderContext.CreateTypedArray
method is not used.
Parameters
- buffer
VARIANT
- The array buffer.
- length
long
- The array length.
- result
I_DOCBUILDER_VALUE**
- 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();