CDotNetInvokeMember
- Updated2023-02-21
- 3 minute(s) read
int CDotNetInvokeMember (CDotNetAssemblyHandle assembly, const char *typeName, CDotNetHandle instance, int invokeMechanism, const char *memberName, size_t numberOfParameters, unsigned int parameterTypes[], void * parameters[], unsigned int returnType, void *returnValue, CDotNetHandle *exception);
Purpose
Calls the specified member of the specified .NET object. You can use this function to call methods, get and set properties, and get and set fields.
The signature of the called member must match the arguments you pass to the parameters of this function.
Parameters
| Input | ||||
| Name | Type | Description | ||
| assembly | CDotNetAssemblyHandle | The handle of the .NET assembly that defines the .NET type whose member you want to call.
|
||
| typeName | const char * | The name of the .NET type whose member you want to call. | ||
| instance | CDotNetHandle | The handle of the .NET object whose member you want to call.
|
||
| invokeMechanism | int | The mechanism to use to invoke the member. You must use one of the following mechanisms:
|
||
| memberName | const char * | The name of the member to call. | ||
| numberOfParameters | size_t | The number of parameters to pass to .NET. | ||
| parameterTypes | unsigned int [] | An array containing the types of the parameters to pass to .NET. | ||
| parameters | void * [] | An array containing the parameters to pass to .NET.
|
||
| returnType | unsigned int | The type of the return value of the call to the member. Pass zero if there is no return value. | ||
| Output | ||||
| Name | Type | Description | ||
| returnValue | void * | The return value of the call to the member. 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
