LabWindows/CVI

CDotNetGetDelegateParameterType

int CDotNetGetDelegateParameterType (CDotNetHandle delegate, ssize_t parameterIndex, CDotNetAssemblyHandle *assembly, char **typeName, unsigned int *typeId, int elementType);

Purpose

Obtains the type information of a delegate parameter or return value.

Parameters

Input
Name Type Description
delegate CDotNetHandle The handle of a delegate object.
parameterIndex ssize_t Zero-based index of the delegate parameter whose type you want to obtain.

Pass -1 to obtain the type information for a return value.
elementType int Specify a nonzero value or select Yes in the function panel to get the element type of an array parameter.

Specify 0 or select No in the function panel otherwise.
Output
Name Type Description
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.
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.
typeId unsigned int The ID of the .NET type. This function outputs one of the following IDs:

  • CDOTNET_VOID
  • CDOTNET_STRING
  • CDOTNET_BOOLEAN
  • CDOTNET_BYTE
  • CDOTNET_SBYTE
  • CDOTNET_INT16
  • CDOTNET_INT32
  • CDOTNET_INT64
  • CDOTNET_UINT16
  • CDOTNET_UINT32
  • CDOTNET_UINT64
  • CDOTNET_SINGLE
  • CDOTNET_DOUBLE
  • CDOTNET_DECIMAL
  • CDOTNET_CHAR
  • CDOTNET_INTPTR
  • CDOTNET_ENUM
  • CDOTNET_OBJECT
  • CDOTNET_STRUCT

This function can return any of these IDs with one or more of the following modifier flags: CDOTNET_OUT, CDOTNET_REF, and CDOTNET_ARRAY.

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.5 and later