ComValue.SetValueFromInvokeStaticMethod
less than 1 minute to read

Sets the Value property from a method call that passes it's positional arguments as an array.

Note that the array of parameters must be passed in as a COM Array.

public void SetValueFromInvokeMethod(string typename,
	string method,
	ComArray parms);

Parameters

typename
Fully qualified name of the .NET type to invoke the static method on

method
Static method to call

parms
An array of the parameters passed (use a ComArray Instance)

Example

foxpro
loComValue = loBridge.CreateComValue() *** Must pass parameters as a ComArray loComArray = loBridge.CreateArray("System.Object") loComArray.AddItem(1) loComArray.AddItem("Hello World") *** Make the actual method call loComValue.SetValueFromInvokeStaticMethod("Westwind.WebConnection.TypePassingTests","ReturnStructStatic",loComArray) *** Result value is a Struct (inaccessible directly in FoxPro) *? loComValue.Value.IntValue && Fails *** Use indirect referencing to retrieve result values ? loBridge.GetPropertyEx(loComValue,"Value.IntValue") ? loBridge.GetPropertyEx(loComValue,"Value.StringValue")

See also:

Class ComValue

© West Wind Technologies, 1996-2024 • Updated: 12/22/16
Comment or report problem with topic