Package com.ms.com Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class Dispatch

Fields , Methods

public final class com.ms.com.Dispatch
{
    // Fields
  static int LOCALE_SYSTEM_DEFAULT 	= 0x800;
  static int Method  			= 0x1;
  static int Get              	= 0x2;
  static int Put               	= 0x4;
  static int PutRef            	= 0x8;
  static int DISPID_UNKNOWN      	= -1;
  static int DISPID_VALUE        	= 0;
  static int DISPID_PROPERTYPUT  	= -3;
  static int DISPID_NEWENUM      	= -4;
  static int DISPID_EVALUATE     	= -5;
  static int DISPID_CONSTRUCTOR  	= -6;
  static int DISPID_DESTRUCTOR   	= -7;
  static int DISPID_COLLECT      	= -8;


   // Methods

  public static Variant invokev(Object  pDispatch,
                                    _Guid   iid,
                                    String  dispName,
                                    int     dispID,
                                    int     lcid,
                                    int     wFlags,
                                    Variant vArg[],
                                    int     uArgErr[])


  public static Variant invokev(Object pDispatch,
                                    String dispName,
                                    int    wFlags,
                                    Variant vArgs[],
                                    int    uArgErr)



  public static Variant invokev(Object pDispatch,
                                    int    dispID,
                                    int    wFlags,
                                    Variant vArgs[],
                                    int    uArgErr)


  public static Variant invoke(Object pDispatch,
                                    _Guid  iid,
                                    String dispName,
                                    int    dispID,
                                    int    lcid,
                                    int    wFlags,
                                    Object oArg[],
                                    int    uArgErr[])
 
  public static Variant invoke(Object pDispatch,
                                    int    dispID,
                                    int    wFlags,
                                    Variant vArgs[],
                                    int    uArgErr)

  public static Variant invoke(Object pDispatch,
                                    String dispName,
                                    int    wFlags,
                                    Variant vArgs[],
                                    int    uArgErr)


  public static void invokeSubv(Object pDispatch,
                                  _Guid  iid,
                                  String dispName,
                                  int    dispID,
                                  int    lcid,
                                  int    wFlags,
                                  Variant vArg[],
                                  int    uArgErr[])

  public static void invokeSubv(Object  pDispatch,
                                 String  dispName,
                                 int     wFlags,
                                 Variant vArg[],
                                 int     uArgErr[])


  public static void invokeSubv(Object  pDispatch,
                                 int     dispid,
                                 int     wFlags,
                                 Variant vArg[],
                                 int     uArgErr[])

  public static void invokeSub(Object pDispatch,
                                 _Guid  iid,
                                 String dispName,
                                 int    dispID,
                                 int    lcid,
                                 int    wFlags,
                                 Object oArg[],
                                 int    uArgErr[])

  public static void invokeSub(Object  pDispatch,
                                 String  dispName,
                                 int     wFlags,
                                 Object  oArg[],
                                 int     uArgErr[])

  public static void invokeSub(Object  pDispatch,
                                 int     dispid,
                                 int     wFlags,
                                 Object  oArg[],
                                 int     uArgErr[])

  public static Variant call(Object pDispatch,
                                   int dispid)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6)

  public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7)


  public static Variant call(Object pDispatch,
                                   String dispName;
                                   Object o0)

  public static Variant call(Object pDispatch,
                                   String dispName;
                                   Object o0,
                                   Object o1)

  public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2)

  public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3)

  public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4)
 
  public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5)

  public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6)

  public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7)

  public static void callSub(Object pDispatch,
                                   int dispid)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6)

  public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7)

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0);

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1);

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2);


  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3);

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4);

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5);

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6);

  public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7);

  public static Variant callN(Object pDispatch, String dispName, Object params[])
  public static Variant callN(Object pDispatch, int dispID, Object params[])

  public static void callSubN(Object pDispatch, String dispName, Object params[])
  public static void callSubN(Object pDispatch, int dispID, Object params[])

  public static Variant get(Object pDispatch, String dispName) 
  public static Variant get(Object pDispatch, int dispID)

  public static void put(Object pDispatch, String dispName, Object val)
  public static void put(Object pDispatch, int dispID, Object val)

  public static void putRef(Object pDispatch, String dispName, Object val)
  public static void putRef(Object pDispatch, int dispID, Object val)
}

Allows method invocation, property access, and name resolution on arbitrary ActiveX™ Automation objects.

All methods and fields of Dispatch are static. It is not necessary to create an instance of this class to use it.

Most Dispatch methods automatically accept the standard primitive type wrappers in place of Variants and create a variant based on the type of the object passed in. The following table describes how the primitive types are mapped to Variants:
Object Instance Variant Passed
null VT_EMPTY
com.ms.com.Variant the object itself
java.lang.Integer VT_I4
java.lang.String VT_BSTR
java.lang.Boolean VT_BOOL
java.lang.Double VT_R8
java.lang.Float VT_R4
none of the above VT_UNKNOWN

The exceptions to this are the three invokev methods, which only accepts Variants.


Fields

Class Dispatch has the following fields. These are static fields and can be accessed without an instantiated Dispatch object.

LOCALE_SYSTEM_DEFAULT = 0x800
The locale context in which to interpret arguments.
Method = 0x1
Member is invoked as a method. Corresponds to the IDispatch::Invoke DISPATCH_METHOD flag.
Get =0x2
Member is retrieved as a property or data member. Corresponds to the IDispatch::Invoke DISPATCH_PROPERTYGET flag.
Put = 0x4
Member is changed as a property or data member. Corresponds to the IDispatch::Invoke DISPATCH_PROPERTYPUT flag.
PutRef = 0x8
Member is changed by a reference assignment, rather than a value assignment. This field is valid only when the property accepts a reference to an object. Corresponds to the IDispatch::Invoke DISPATCH_PROPERTYPUTREF flag.
DISPID_UNKNOWN = -1
Dispatch identifier reserved by Microsoft.
DISPID_VALUE = 0
Dispatch identifier reserved by Microsoft.
DISPID_PROPERTYPUT = -3
Dispatch identifier reserved by Microsoft.
DISPID_NEWENUM = -4
Dispatch identifier reserved by Microsoft.
DISPID_EVALUATE = -5
DISPID_CONSTRUCTOR = -6
Dispatch identifier reserved by Microsoft.
DISPID_DESTRUCTOR = -7
Dispatch identifier reserved by Microsoft.
DISPID_COLLECT = -8
Dispatch identifier reserved by Microsoft.


Methods


call

public static Variant call(Object pDispatch, int dispid);

Executes IDispatch::Invoke on an ActiveX™ Automation object calling a method, specified by its dispatch identifier, and passing no arguments to the method.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX Automation object.
dispID Dispatch identifier of the dispatch member.


call

public static Variant call(Object pDispatch, String dispName);

Executes IDispatch::Invoke on an ActiveX™ Automation object, calling a method, specified by its dispatch name string, and passing no arguments to the method.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName Name of the dispatch member.


call

public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0);
public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1);
public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2);

public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3);
public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4);
public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5);
public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6);
public static Variant call(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7);

Executes IDispatch::Invoke on an ActiveX™ Automation object calling a method, specified by its dispatch identifier, passing one or more arguments to the method and returning a value.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call. If the ActiveX automation method does not return a value, use Dispatch.callSub instead. Certain ActiveX automation methods (such as subroutines implemented by Visual Basic) will fail if Dispatch.call is used to invoke them.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispid Dispatch identifier of the dispatch member.
o0 Object passed to the method as an argument.
o1 Object passed to the method as an argument.
o2 Object passed to the method as an argument.
o3 Object passed to the method as an argument.
o4 Object passed to the method as an argument.
o5 Object passed to the method as an argument.
o6 Object passed to the method as an argument.
o7 Object passed to the method as an argument.

Remarks:

This method has eight different variations; choose the one that corresponds to the number of object parameters you want to pass.


call

public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0);
public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1);
public static Variant call(Object pDispatch, 
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2);

public static Variant call(Object pDispatch, 
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3);
public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4);
public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5);
public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6);
public static Variant call(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7);

Executes IDispatch::Invoke on an ActiveX™ Automation object calling a method, specified by its dispatch name string, and passing one or more arguments to the method.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call. If the ActiveX automation method does not return a value, use Dispatch.callSub instead. Certain ActiveX automation methods (such as subroutines implemented by Visual Basic) will fail if Dispatch.call is used to invoke them.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName Name string of the dispatch member.
o0 Object passed to the method as an argument.
o1 Object passed to the method as an argument.
o2 Object passed to the method as an argument.
o3 Object passed to the method as an argument.
o4 Object passed to the method as an argument.
o5 Object passed to the method as an argument.
o6 Object passed to the method as an argument.
o7 Object passed to the method as an argument.

Remarks:

This method has eight different variations; choose the one that corresponds to the number of object parameters you want to pass.


callN

public static Variant callN(Object  pDispatch,  String  dispName,  Object  oArg[]); 

Executes IDispatch::Invoke on an ActiveX™ Automation object calling a method, specified by its dispatch name with an array of arguments.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call. If the ActiveX automation method does not return a value, use Dispatch.callSubN instead. Certain ActiveX automation methods (such as subroutines implemented by Visual Basic) will fail if Dispatch.call is used to invoke them.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName String name of the method exposed by the object.
oArg Parameters to the method call. May be null if no parameters.


callN

public static Variant callN(Object  pDispatch,  int  dispID,  Object  oArg[]); 

Executes IDispatch::Invoke on an ActiveX™ Automation object calling a method, specified by its dispatch identifier, with an array of arguments.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call. If the ActiveX automation method does not return a value, use Dispatch.callSubN instead. Certain ActiveX automation methods (such as subroutines implemented by Visual Basic) will fail if Dispatch.call is used to invoke them.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispID Dispatch identifier of the method exposed by the object.
oArg Parameters to the method call. May be null if no parameters.


callSubN

public static void callSubN(Object  pDispatch,  String  dispName,  Object  oArg[]); 

Executes IDispatch::Invoke on an ActiveX™ Automation object implemented in Microsoft® Visual Basic®, calling a method, specified by its dispatch name with an array of arguments.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName String name of the method exposed by the object.
oArg Parameters to the method call. May be null if no parameters.

Remarks:

Unlike the Dispatch.callN method, this method does not accept a return value from the method. If the return value is required, use the Dispatch.callN method. This method is useful for call Visual Basic® subroutines, which cannot be invoked with a request for a return value.


callSubN

public static void callSubN(Object  pDispatch,  int  dispID,  Object  oArg[]); 

Executes IDispatch::Invoke on an ActiveX™ Automation object implemented in Visual Basic® calling a method, specified by its dispatch identifier, with an array of arguments.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispID Dispatch identifier of the method exposed by the object.
oArg Parameters to the method call. May be null if no parameters.

Remarks:

Unlike the Dispatch.callN method, this method does not accept a return value from the method. If the return value is required, use the Dispatch.callN method. This method is useful for call Visual Basic® subroutines, which cannot be invoked with a request for a return value.


callSub

public static void callSub(Object pDispatch, String dispName);

Executes IDispatch::Invoke on an ActiveX™ Automation object, calling a method, specified by its dispatch name string, and passing no arguments to the method.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName Name of the dispatch member.

Remarks:

Unlike the Dispatch.call method, this method does not accept a return value from the method. If the return value is required, use the Dispatch.call method. This method is useful for call Visual Basic® subroutines, which cannot be invoked with a request for a return value.


callSub

public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0);
public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1);
public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2);

public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3);
public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4);
public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5);
public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6);
public static void callSub(Object pDispatch,
                                   int dispid,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7);

Executes IDispatch::Invoke on an ActiveX™ Automation object implemented in Visual Basic® calling a method, specified by its dispatch identifier, and passing one or more arguments to the method.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispid Dispatch identifier of the dispatch member.
o0 Object passed to the method as an argument.
o1 Object passed to the method as an argument.
o2 Object passed to the method as an argument.
o3 Object passed to the method as an argument.
o4 Object passed to the method as an argument.
o5 Object passed to the method as an argument.
o6 Object passed to the method as an argument.
o7 Object passed to the method as an argument.

Remarks:

This method has eight different variations; choose the one that corresponds to the number of object parameters you wish to pass.

Unlike the Dispatch.call method, this method does not accept a return value from the method. If the return value is required, use the Dispatch.call method. This method is useful for call Visual Basic® subroutines, which cannot be invoked with a request for a return value.


callSub

public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0);
public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1);
public static void callSub(Object pDispatch, 
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2);

public static void callSub(Object pDispatch, 
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3);
public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4);
public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5);
public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6);
public static void callSub(Object pDispatch,
                                   String dispName,
                                   Object o0,
                                   Object o1,
                                   Object o2,
                                   Object o3,
                                   Object o4,
                                   Object o5,
                                   Object o6,
                                   Object o7);

Executes IDispatch::Invoke on an ActiveX Automation object implemented in Visual Basic® calling a method, specified by its dispatch name string, and passing one or more arguments to the method.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName Name string of the dispatch member.
o0 Object passed to the method as an argument.
o1 Object passed to the method as an argument.
o2 Object passed to the method as an argument.
o3 Object passed to the method as an argument.
o4 Object passed to the method as an argument.
o5 Object passed to the method as an argument.
o6 Object passed to the method as an argument.
o7 Object passed to the method as an argument.

Remarks:

This method has eight different variations; choose the one that corresponds to the number of object parameters you want to pass.

Unlike the Dispatch.call method, this method does not accept a return value from the method. If the return value is required, use the Dispatch.call method. This method is useful for call Visual Basic® subroutines, which cannot be invoked with a request for a return value.


get

public static Variant get(Object pDispatch, String dispName);

Executes IDispatch::Invoke on an ActiveX™ Automation object with wFlag set to Dispatch.Get so that a property or a data member can be retrieved. Uses a dispatch name to identify the dispatch member.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName String name of the dispatch member.


get

public static Variant get(Object pDispatch, int dispID);

Executes IDispatch::Invoke on an ActiveX™ Automation object with wFlag set to Dispatch.Get so that a property or a data member can be retrieved. Uses a dispatch identifier to identify the dispatch member.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispID Dispatch identifier of the dispatch member.


invoke

public static Variant invoke(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Object oArg[], int uArgErr[]);

Executes IDispatch::Invoke on an ActiveX Automation object.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX Automation object.
iid Globally unique identifier (GUID) of an IDispatch-derived interface. If null, this defaults to IID_IDispatch. The IDispatch::Invoke call will be executed on this interface.
dispName String name of the property or method exposed by the object. If null, the dispID parameter is used to determine the property or method.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object. This is ignored unless the dispName parameter is null.
lcid The locale identifier. Typically set to LOCALE_SYSTEM_DEFAULT.
wFlags Type of invocation being called. Set to some combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
oArg Parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index value of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is identical to the invokev method with the exception that this method accepts primitive type wrappers or Variants for passed parameters.


invoke

public static Variant invoke(Object pDispatch, 
String dispName, int  wFlags, Object oArg[], int  uArgErr);

Executes IDispatch::Invoke on an ActiveX™ Automation object with the provided subset of parameters.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX Automation object.
dispName String name of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
oArg Parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index value of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is identical to the invokev method with the exception that this method accepts primitive type wrappers or Variants for passed parameters.


invoke

public static Variant invoke(Object pDispatch, int dispID,
int wFlags, Object oArg[], int uArgErr);

Executes IDispatch::Invoke on an ActiveX™ Automation object with the provided subset of parameters.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
oArg Parameters to the IDispatch::Invoke call. May be null if no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index value of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is identical to the invokev method with the exception that this method accepts primitive type wrappers or Variants for passed parameters.


invokeSub

 public static void invokeSub(Object pDispatch,  _Guid  iid, String dispName, int dispID, int lcid, int wFlags, Object oArg[],int uArgErr[]); 

Executes IDispatch::Invoke on an ActiveX™ Automation object implemented in Visual Basic®.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX Automation object.
iid Globally unique identifier (GUID) of an IDispatch-derived interface. If null, this defaults to IID_IDispatch. The IDispatch::Invoke call will be executed on this interface.
dispName String name of the property or method exposed by the object. If null, the dispID parameter is used to determine the property or method.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object. This is ignored unless the dispName parameter is null.
lcid Locale identifier. Typically set to LOCALE_SYSTEM_DEFAULT.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
oArg Parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

Visual Basic Subroutines cannot be invoked requesting a return value. This method is identical to the invokeSubv method with the exception that this method accepts primitive type wrappers or Variants for passed parameters.


invokeSub

public static void invokeSub(Object pDispatch, 
String dispName, int  wFlags, Object oArg[], int  uArgErr);

Executes IDispatch::Invoke with the specified subset of parameters on an ActiveX™ Automation object implemented in Visual Basic®.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName String name of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
oArg Parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index value of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is identical to the invokeSubv method with the exception that this method accepts primitive type wrappers or Variants for passed parameters.


invokeSub

public static void invokeSub(Object pDispatch, int dispID, int wFlags, Object oArg[], int uArgErr);

Executes IDispatch::Invoke with the specified subset of parameters on an ActiveX™ Automation object implemented in Visual Basic®.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX Automation object.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
oArg Parameters to the IDispatch::Invoke call. May be null if no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index value of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is identical to the invokeSubv method with the exception that this method accepts primitive type wrappers or Variants for passed parameters. Visual Basic® subroutines cannot be invoked with a request for a return value.


invokeSubv

public static void invokeSubv(Object pDispatch,  _Guid  iid, String dispName, int dispID, int lcid, int wFlags, Variant vArg[],int uArgErr[]); 

Executes IDispatch::Invoke with the specified subset of parameters on an ActiveX™ Automation object implemented in Visual Basic®.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
iid Globally unique identifier (GUID) of an IDispatch-derived interface. If null, this defaults to IID_IDispatch. The IDispatch::Invoke call will be executed on this interface.
dispName String name of the property or method exposed by the object. If null, the dispID parameter is used to determine the property or method.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object. This is ignored unless the dispName parameter is null.
lcid Locale identifier. Typically set to LOCALE_SYSTEM_DEFAULT.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
vArg Variant parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

Visual Basic&erg; subroutines cannot be invoked requesting a return value.


invokeSubv

public static void invokeSubv(Object pDispatch, String dispName, int  wFlags, Variant vArgs[], int  uArgErr);

Executes IDispatch::Invoke with the specified subset of parameters on an ActiveX™ Automation object implemented in Visual Basic®.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName String name of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
vArg Variant parameters to the IDispatch::Invoke call. May be null if no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is similar to the general invokev method, but the following IDispatch::Invoke parameters are automatically set to defaults:
Parameter Default
iid null
dispID not needed
lcid Dispatch.LOCALE_SYSTEM_DEFAULT

Remarks:

Visual Basic® subroutines cannot be invoked requesting a return value.


invokeSubv

public static void invokeSubv(Object pDispatch, int dispID, int wFlags, Variant vArgs[], int uArgErr);

Executes IDispatch::Invoke with the specified subset of parameters on an ActiveX™ Automation object implemented in Visual Basic®.

Return Value:

No return value.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
vArg Variant parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is similar to the general invokev method, but the following IDispatch::Invoke parameters are automatically set to defaults:
Parameter Default
iid null
dispName not needed
lcid Dispatch.LOCALE_SYSTEM_DEFAULT

Remarks:

Visual Basic® subroutines cannot be invoked requesting a return value.


invokev

public static Variant invokev(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Variant vArg[], int uArgErr[]);

Executes IDispatch::Invoke on an ActiveX™ Automation object.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX™ Automation object.
iid Globally unique identifier (GUID) of an IDispatch-derived interface. If null, this defaults to IID_IDispatch. The IDispatch::Invoke call will be executed on this interface.
dispName String name of the property or method exposed by the object. If null, the dispID parameter is used to determine the property or method.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object. This is ignored unless the dispName parameter is null.
lcid Locale identifier. Typically set to LOCALE_SYSTEM_DEFAULT.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
vArg Variant parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.


invokev

public static Variant invokev(Object pDispatch, String dispName, int  wFlags, Variant vArgs[], int  uArgErr);

Executes IDispatch::Invoke with the provided subset of parameters on an ActiveX Automation object.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX Automation object.
dispName String name of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
vArg Variant parameters to the IDispatch::Invoke call. May be null if no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is similar to the general invokev method, but the following IDispatch::Invoke parameters are automatically set to defaults:
Parameter Default
iid null
dispID not needed
lcid Dispatch.LOCALE_SYSTEM_DEFAULT


invokev

public static Variant invokev(Object pDispatch, int dispID, int wFlags, Variant vArgs[], int uArgErr);

Executes IDispatch::Invoke with the provided subset of parameters on an ActiveX Automation object.

Return Value:

Returns a Variant object representing the Variant that was returned by the IDispatch::Invoke call.

ParameterDescription
pDispatch ActiveX Automation object.
dispID Dispatch identifier (DISPID) of the property or method exposed by the object.
wFlags Type of invocation. Can be a combination of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef.
vArg Variant parameters to the IDispatch::Invoke call. May be null if there are no parameters. Must be one element in size if wFlags is Dispatch.Put or Dispatch.PutRef.
uArgErr Index of the parameter that caused the failure. If non-null, must be an array of size 1.

Remarks:

This method is similar to the general invokev method, but the following IDispatch::Invoke parameters are automatically set to defaults:
Parameter Default
iid null
dispName not needed
lcid Dispatch.LOCALE_SYSTEM_DEFAULT


put

public static void put(Object pDispatch, int dispID, Object val);
 

Executes IDispatch::Invoke on an ActiveX Automation object with wFlag set to Dispatch.Put to change a property or a data member. Uses a dispatch identifier to identify the dispatch member.

ParameterDescription
pDispatch ActiveX Automation object.
dispID Dispatch identifier of the dispatch member.
val Value to be changed.


put

public static void put(Object pDispatch, String dispName, Object val);

Executes IDispatch::Invokeon an ActiveX™ Automation object with wFlag set to Dispatch.Put to change a property or a data member. Uses a dispatch name to identify the dispatch member.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName String name of the dispatch member.
val Value to be changed.


putRef

public static void putRef(Object pDispatch, String dispName, Object val);

Executes IDispatch::Invoke on an ActiveX Automation object with wFlag set to Dispatch.PutRef to change a reference. Uses a dispatch name to identify the dispatch member.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispName string name of the dispatch member.
val Reference value to be changed.


putRef

public static void putRef(Object pDispatch, int dispID, Object val);

Executes IDispatch::Invoke on an ActiveX™ Automation object with wFlag set to Dispatch.PutRef to change a reference. Uses a dispatch identifier to identify the dispatch member.

ParameterDescription
pDispatch ActiveX™ Automation object.
dispID Dispatch identifier of the dispatch member.
val Reference value to be changed.



Top© 1997 Microsoft Corporation. All rights reserved. Terms of Use.