LabWindows/CVI

CDotNetObjectGetType

int CDotNetObjectGetType (CDotNetHandle object, char **typeName, CDotNetAssemblyHandle *assembly, CDotNetHandle *type, CDotNetHandle *exception);

Purpose

Calls the .NET System.Object.GetType method to get the type information of a .NET object.

Parameters

Input
Name Type Description
object CDotNetHandle The handle of a .NET object.
Output
Name Type Description
typeName char * The .NET type name. Pass the address of a char * variable for this parameter. You must use CDotNetFreeMemory to free the output string.

You can pass NULL for this parameter.
assembly CDotNetAssemblyHandle A handle to the assembly that defines the .NET type. You must use CDotNetDiscardAssemblyHandle to discard the output assembly handle.

You can pass NULL for this parameter.
type CDotNetHandle The System.Type handle for the .NET object. You must use CDotNetDiscardHandle to discard the output handle.

You can pass NULL for this parameter.
exception CDotNetHandle The handle to an exception thrown by .NET.

If .NET throws an exception, you can pass this handle to CDotNetGetExceptionInfo to get information from the exception object.

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