Rediger

Del via


IRemoteMethodInfoContract.Invoke Method

Definition

Invokes the method that this IRemoteMethodInfoContract identifies.

public:
 System::AddIn::Contract::RemoteArgument Invoke(System::AddIn::Contract::Automation::IRemoteObjectContract ^ target, System::Reflection::BindingFlags bindingFlags, System::AddIn::Contract::Collections::IRemoteArgumentArrayContract ^ parameters, int localeId);
public System.AddIn.Contract.RemoteArgument Invoke (System.AddIn.Contract.Automation.IRemoteObjectContract target, System.Reflection.BindingFlags bindingFlags, System.AddIn.Contract.Collections.IRemoteArgumentArrayContract parameters, int localeId);
abstract member Invoke : System.AddIn.Contract.Automation.IRemoteObjectContract * System.Reflection.BindingFlags * System.AddIn.Contract.Collections.IRemoteArgumentArrayContract * int -> System.AddIn.Contract.RemoteArgument
Public Function Invoke (target As IRemoteObjectContract, bindingFlags As BindingFlags, parameters As IRemoteArgumentArrayContract, localeId As Integer) As RemoteArgument

Parameters

target
IRemoteObjectContract

The IRemoteObjectContract that identifies the object that contains the method to invoke.

bindingFlags
BindingFlags

A bitwise combination of the BindingFlags values that specifies how to invoke the method.

parameters
IRemoteArgumentArrayContract

An IRemoteArgumentArrayContract that specifies the method parameters; null if the method does not have any parameters.

localeId
Int32

The locale ID that the method will use for any locale-specific type conversions of the arguments or return value.

Returns

A RemoteArgument that specifies the return value of the invoked method.

Remarks

If the invoked method does not have a return value (for example, the method is a constructor), Invoke returns a default RemoteArgument in which the RemoteArgumentKind property is set to the value RemoteArgumentKind.Missing and the TypeCode property is set to the value TypeCode.Empty.

Applies to