CDotNetGetArrayElementType
- Updated2023-02-21
- 1 minute(s) read
int CDotNetGetArrayElementType (CDotNetHandle array, unsigned int *typeId, CDotNetAssemblyHandle *assembly, char **elementTypeName);
Purpose
Returns the ID, assembly, and name of the element type of a .NET array.
Parameters
| Input | ||
| Name | Type | Description |
| array | CDotNetHandle | The handle of the .NET array. |
| Output | ||
| Name | Type | Description |
| typeId | unsigned int | The ID of the .NET array element type. This function outputs one of the following IDs:
For jagged arrays (arrays of arrays), the elements are themselves arrays, and so the ID is the type logically ORed (|) with CDOTNET_ARRAY. You can pass NULL for this parameter. |
| assembly | CDotNetAssemblyHandle | The handle of the .NET assembly that defines the .NET array element type. For primitive types, this will be the handle to the mscorlib assembly. You can pass NULL for this parameter if you do not want this information. |
| elementTypeName | char * | Pass the address of a char * variable in which to store the name of the .NET array element type. When you finish using the name, you must call CDotNetFreeMemory to free it. You can pass NULL for this parameter. |
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