Cubicle (Invocation)

cInvoke

=cInvoke(
  string target, 
  string memberName, 
  object[,] parameters, 
  object key, 
  object[] methodArgs = null, 
  object[] classArgs = null, 
  string engineAlias = null)

Parameters
  • target: The target of the invocation (either a handle or class name)
  • memberName: The member to invoke (use .ctor to call constructor or .ctorc to call custom constructor)
  • parameters: (Optional) The parameters to pass to the target
  • key: (Optional) The key to use when storing results. Omitting this parameters will return the result instead of storing. See Handle Generation for more details.
  • methodArgs: (Optional) The type names for generic method arguments.
  • classArgs: (Optional) The type names for generic class arguments
  • engineAlias: (Optional) An alias for this Cubicle. Default is used on omission

Summary

The cInvoke worksheet function encapsulates the most generic call for method invocation. The Invocation API will recognise two special values of the memberName parameter which will determine the destination of the API call. The following parameter values are noteworthy:
  • memberName = “.ctor”: Object Creation
  • memberName = “.ctorc”: Custom Creation
  • memberName = anything else: Standards method invocation

The target parameter determines whether the call is intended to perform an action on an object instance (instance members) or a type (static members and constructors).

The parameters parameter will contain the parameters for method calls, constructor calls and field or property set operations.

The key parameter determines the behaviour of the result that should be returned. The appropriate handle generation algorithm will be applied to the key to create the handle that is returned to the user. For a better understanding on how handles are generated from keys, see Handle Generation.

The methodArgs parameter is only used when calling generic methods an makes provision for the user to supply a list of .NET type names to serve as the generic arguments to the function call.

The classArgs parameter is only used when calling members of a generic class and allows users to supply a list of .NET type names to serve as class arguments to the call.

The engineAlias parameter allows users to specify the alias of the connection for the call.

cInvokeMt

=InvokeMt(
        string target,
        string memberName,
        object[,] parameters,
        object key,
        object[] methodArgs = null,
        object[] classArgs = null,
        string engineAlias = null)

Summary

Exactly the same as cInvoke except that these function calls will be evaluated by Excel 2007+ as multi-threaded cell formulae.

cInvokeRepeat

=InvokeRepeat(
        int milliseconds,
        string target,
        string memberName,
        object[,] parameters)

Parameters
  • milliseconds: The number of milliseconds between consecutive member calls.
  • target: The target of the invocation (either a handle or class name).
  • memberName: The member to invoke (use .ctor to call constructor or .ctorc to call custom constructor)
  • parameters: (Optional) The parameters to pass to the target.

Summary

Repeatedly invokes a member asynchronously and returns the result to Excel.

cInvokeBuffer

=InvokeBuffer(
        int bufferSize,
        int milliseconds,
        string target,
        string memberName,
        object[,] parameters,
        object missing)

Parameters
  • bufferSize: The size of the rolling buffer.
  • milliseconds: The number of milliseconds between consecutive member calls.
  • target: The target of the invocation (either a handle or class name).
  • memberName: The member to invoke (use .ctor to call constructor or .ctorc to call custom constructor)
  • parameters: (Optional) The parameters to pass to the target.

Summary

Similar to cInvokeRepeat but returns a rolling buffer of the invocation results.

Last edited May 8, 2013 at 7:36 AM by Tjaart, version 6

Comments

No comments yet.