LabWindows/CVI

CDotNetCreateTypedArray

int CDotNetCreateTypedArray (CDotNetAssemblyHandle elementTypeAssembly, const char *elementTypeName, size_t numberOfDimensions, ssize_t lowerBounds[], ssize_t lengths[], void *elements, CDotNetHandle *array);

Purpose

Creates a .NET array of the specified .NET object type. This function also can be used to create jagged arrays (array of arrays). To create a rectangular .NET array of a fundamental scalar type, use CDotNetCreateArray.

Parameters

Input
Name Type Description
elementTypeAssembly CDotNetAssemblyHandle The handle of the .NET assembly that defines the element type of the .NET array.
elementTypeName const char * The name of the element type of the .NET array.
numberOfDimensions size_t The number of dimensions of the .NET array.
lowerBounds ssize_t [] An array containing the lower bound for each dimension of the .NET array. You can pass zero to use the default lower bound (0) for all dimensions.
lengths ssize_t [] An array containing the lengths of each dimension of the .NET array.
elements void * The elements to use to initialize the .NET array. You can pass zero to initialize the array with default values.
Output
Name Type Description
array CDotNetHandle The handle of the array this function creates. You must call CDotNetDiscardHandle to discard this handle when it is no longer needed.

Return Value

Name Type Description
status int A value indicating whether an error occurred. Negative error codes indicate function failure.

Error codes are defined in cvi\include\cvidotnet.h.

You can use CDotNetGetErrorDescription to get the description of an error code.

Additional Information

Library: .NET Library

Include file: cvidotnet.h

LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later