Package com.ms.com |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class Dispatch { // Fields public static final int LOCALE_SYSTEM_DEFAULT = 0x800; public static final int Method = 0x1; public static final int Get = 0x2; public static final int Put = 0x4; public static final int PutRef = 0x8; public static final int DISPID_UNKNOWN = -1; public static final int DISPID_VALUE = 0; public static final int DISPID_PROPERTYPUT = -3; public static final int DISPID_NEWENUM = -4; public static final int DISPID_EVALUATE = -5; public static final int DISPID_CONSTRUCTOR = -6; public static final int DISPID_DESTRUCTOR = -7; public static final int DISPID_COLLECT = -8; public static final int DISPID_AUTOSIZE = -500; public static final int DISPID_BACKCOLOR = -501; public static final int DISPID_BACKSTYLE = -502; public static final int DISPID_BORDERCOLOR = -503; public static final int DISPID_BORDERSTYLE = -504; public static final int DISPID_BORDERWIDTH = -505; public static final int DISPID_DRAWMODE = -507; public static final int DISPID_DRAWSTYLE = -508; public static final int DISPID_DRAWWIDTH = -509; public static final int DISPID_FILLCOLOR = -510; public static final int DISPID_FILLSTYLE = -511; public static final int DISPID_FONT = -512; public static final int DISPID_FORECOLOR = -513; public static final int DISPID_ENABLED = -514; public static final int DISPID_HWND = -515; public static final int DISPID_TABSTOP = -516; public static final int DISPID_TEXT = -517; public static final int DISPID_CAPTION = -518; public static final int DISPID_BORDERVISIBLE = -519; public static final int DISPID_APPEARANCE = -520; public static final int DISPID_MOUSEPOINTER = -521; public static final int DISPID_MOUSEICON = -522; public static final int DISPID_PICTURE = -523; public static final int DISPID_VALID = -524; public static final int DISPID_READYSTATE = -525; public static final int DISPID_REFRESH = -550; public static final int DISPID_DOCLICK = -551; public static final int DISPID_ABOUTBOX = -552; public static final int DISPID_CLICK = -600; public static final int DISPID_DBLCLICK = -601; public static final int DISPID_KEYDOWN = -602; public static final int DISPID_KEYPRESS = -603; public static final int DISPID_KEYUP = -604; public static final int DISPID_MOUSEDOWN = -605; public static final int DISPID_MOUSEMOVE = -606; public static final int DISPID_MOUSEUP = -607; public static final int DISPID_ERROREVENT = -608; public static final int DISPID_READYSTATECHANGE = -609; public static final int DISPID_AMBIENT_BACKCOLOR = -701; public static final int DISPID_AMBIENT_DISPLAYNAME = -702; public static final int DISPID_AMBIENT_FONT = -703; public static final int DISPID_AMBIENT_FORECOLOR = -704; public static final int DISPID_AMBIENT_LOCALEID = -705; public static final int DISPID_AMBIENT_MESSAGEREFLECT = -706; public static final int DISPID_AMBIENT_SCALEUNITS = -707; public static final int DISPID_AMBIENT_TEXTALIGN = -708; public static final int DISPID_AMBIENT_USERMODE = -709; public static final int DISPID_AMBIENT_UIDEAD = -710; public static final int DISPID_AMBIENT_SHOWGRABHANDLES = -711; public static final int DISPID_AMBIENT_SHOWHATCHING = -712; public static final int DISPID_AMBIENT_DISPLAYASDEFAULT = -713; public static final int DISPID_AMBIENT_SUPPORTSMNEMONICS = -714; public static final int DISPID_AMBIENT_AUTOCLIP = -715; public static final int DISPID_AMBIENT_APPEARANCE = -716; public static final int DISPID_AMBIENT_PALETTE = -726; public static final int DISPID_AMBIENT_TRANSFERPRIORITY = -728; // Methods public static Variant invokev(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Variant vArg[], int uArgErr[]) public static void invokeSubv(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Variant vArg[], int uArgErr[]) public static Variant invoke(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Object oArg[], int uArgErr[]) public static void invokeSub(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Object oArg[], int uArgErr[]) public static Variant invokev(Object pDispatch, String dispName, int wFlags, Variant vArg[], int uArgErr[]) public static void invokeSubv(Object pDispatch, String dispName, int wFlags, Variant vArg[], int uArgErr[]) public static Variant invokev(Object pDispatch, int dispid, int wFlags, Variant vArg[], int uArgErr[]) public static void invokeSubv(Object pDispatch, int dispid, int wFlags, Variant vArg[], int uArgErr[]) public static Variant invoke(Object pDispatch, String dispName, int wFlags, Object oArg[], int uArgErr[]) public static void invokeSub(Object pDispatch, String dispName, int wFlags, Object oArg[], int uArgErr[]) public static Variant invoke(Object pDispatch, int dispid, 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, String dispName) 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 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) }
The Dispatch class allows Java programs to invoke methods and access properties on any ActiveX Automation object (any ActiveX component that supports the IDispatch interface.) All methods on Dispatch are static. It is never necessary to instantiate this class.
Though this class has a large number of methods, there are really only three key methods that define this class's capabilities:
getIDsOfNames: Map method/property names to dispid's.
invokev: Invoke a method or access a property.
invokeSubv: Invoke a subroutine.
The other methods only provide syntactic sugar by supplying commonly used default parameters. Though many programs will never call the raw methods above directly, it is useful to know their capabilities. If something can't be done with one of these methods, it cannot be done with the Dispatch class.
Following is a description of each parameter required by invokev and invokeSubv, and what the default value is if not explicitly mentioned by the documentation for a wrapper method:
Method | Description |
Object pDispatch | Either a Java object that wraps an ActiveX Automation object or a Variant that can be coerced to such an object via Variant.toDispatch(). There is no default value for this parameter. Every wrapper method requires it. |
_Guid iid | The IID of the interface (which must derive from IDispatch) to invoke. If this value is missing or null, IID_IDispatch is assumed. |
String dispName | The name of the method or property. If this value is null, the dispID parameter is used to determine the method or property. |
int dispID | Indicates the method or property. This parameter is ignored if dispName != null. |
int lcid | Indicates the locale id. Wrapper methods automatically pass Dispatch.LOCALE_SYSTEM_DEFAULT for this value. |
int wFlags | Indicates the type of access: must be one of Dispatch.Method, Dispatch.Get, Dispatch.Put or Dispatch.PutRef. Most of the wrappers provide a fixed access that is obvious from looking at the method name. |
Variant vArg | The parameters to the method or property accessor. Most wrapper methods accept arbitrary objects rather than just variants. Objects are converted to the appropriate variant type according to the following rules:
|
int uArgErr[] | If not null, must be a 1-element integer array. If the Automation object rejects a parameter, this array will receive the index of the offending parameter. |
public static Variant call(Object pDispatch, String dispName)Invokes a nullary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name
public static Variant call(Object pDispatch, String dispName, Object o0)Invokes a 1-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1)Invokes a 2-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1, Object o2)Invokes a 3-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1, Object o2, Object o3)Invokes a 4-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1, Object o2, Object o3, Object o4)Invokes a 5-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1, Object o2, Object o3, Object o4, Object o5)Invokes a 6-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod o5 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6)Invokes a 7-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod o5 parameter to dispmethod o6 parameter to dispmethod
public static Variant call(Object pDispatch, String dispName, Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7)Invokes a 8-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method by name o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod o5 parameter to dispmethod o6 parameter to dispmethod o7 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid)Invokes a nullary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid
public static Variant call(Object pDispatch, int dispid, Object o0)Invokes a 1-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1)Invokes a 2-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1, Object o2)Invokes a 3-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1, Object o2, Object o3)Invokes a 4-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1, Object o2, Object o3, Object o4)Invokes a 5-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1, Object o2, Object o3, Object o4, Object o5)Invokes a 6-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod o5 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6)Invokes a 7-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod o5 parameter to dispmethod o6 parameter to dispmethod
public static Variant call(Object pDispatch, int dispid, Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7)Invokes a 8-ary method on an ActiveX Automation object.
Return Value:
Returns The variant returned by the method.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method by dispid o0 parameter to dispmethod o1 parameter to dispmethod o2 parameter to dispmethod o3 parameter to dispmethod o4 parameter to dispmethod o5 parameter to dispmethod o6 parameter to dispmethod o7 parameter to dispmethod
public static Variant invoke(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Object oArg[], int uArgErr[])Invokes a method or accesses a property on an ActiveX Automation object. This method is essentially a direct wrapper around the IDispatch::Invoke method. The difference between this method and invokev is that this method accepts arbitrary objects rather than Variants as arguments to the invoked method.
Return Value:
Returns The variant returned by the method or property access.
Parameter Description pDispatch Java proxy to ActiveX Automation object. iid identifies interface to call: if null, defaults to IID_IDispatch. dispName identifies the method or property by name: if null, dispID is used. dispID identifies the method or property by dispid: ignored unless dispName is null. lcid locale id. wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef oArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static Variant invoke(Object pDispatch, String dispName, int wFlags, Object oArg[], int uArgErr[])Invokes a method or accesses a property on an ActiveX Automation object. This method is essentially a direct wrapper around the IDispatch::Invoke method. This method is easier to call than the full invokev method, and allows you to pass arbitrary objects rather than Variants, but does not allow you to specify the interface IID or the locale, and the method must be identified by name.
Return Value:
Returns The variant returned by the method or property access.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method or property by name wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef oArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static Variant invoke(Object pDispatch, int dispid, int wFlags, Object oArg[], int uArgErr[])Invokes a method or accesses a property on an ActiveX Automation object. This method is essentially a direct wrapper around the IDispatch::Invoke method. This method is easier to call than the full invokev method, and allows you to pass arbitrary objects rather than Variants, but does not allow you to specify the interface IID or the locale, and the method must be identified by dispid.
Return Value:
Returns The variant returned by the method or property access.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method or property by dispid wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef oArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static void invokeSub(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Object oArg[], int uArgErr[])Invokes a subroutine or sets a property on an ActiveX Automation object. This method is very similar to invokev but does not accept a return value from the method. Some language implementations do not allow invoking subroutines as if they were functions. To avoid problems, use invokeSub if the method does not return a value.
Parameter Description pDispatch Java proxy to ActiveX Automation object. iid identifies interface to call: if null, defaults to IID_IDispatch. dispName identifies the method or property by name: if null, dispID is used. dispID identifies the method or property by dispid: ignored unless dispName is null. lcid locale id. wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef oArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error. The difference between this method and invoke is that this method accepts arbitrary objects rather than Variants as arguments to the invoked method.
public static void invokeSub(Object pDispatch, String dispName, int wFlags, Object oArg[], int uArgErr[])Invokes a subroutine or sets a property on an ActiveX Automation object. This method is very similar to invokev but does not accept a return value from the method. Some language implementations do not allow invoking subroutines as if they were functions. To avoid problems, use invokeSub if the method does not return a value. This method is easier to call than the full invokeSub method, and allows you to pass arbitrary objects rather than Variants, but does not allow you to specify the interface IID or the locale, and the method must be identified by name.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method or property by name wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef oArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static void invokeSub(Object pDispatch, int dispid, int wFlags, Object oArg[], int uArgErr[])Invokes a subroutine or sets a property on an ActiveX Automation object. This method is very similar to invokev but does not accept a return value from the method. Some language implementations do not allow invoking subroutines as if they were functions. To avoid problems, use invokeSub if the method does not return a value. This method is easier to call than the full invokeSub method, and allows you to pass arbitrary objects rather than Variants, but does not allow you to specify the interface IID or the locale, and the method must be identified by dispid.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispid identifies the method or property by dispid wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef oArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static void invokeSubv(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Variant vArg[], int uArgErr[])Invokes a subroutine or sets a property on an ActiveX Automation object. This method is very similar to invokev but does not accept a return value from the method. Some language implementations do not allow invoking subroutines as if they were functions. To avoid problems, use invokeSubv if the method does not return a value.
Parameter Description pDispatch Java proxy to ActiveX Automation object. iid identifies interface to call: if null, defaults to IID_IDispatch. dispName identifies the method or property by name: if null, dispID is used. dispID identifies the method or property by dispid: ignored unless dispName is null. lcid locale id. wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef vArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static void invokeSubv(Object pDispatch, String dispName, int wFlags, Variant vArg[], int uArgErr[])Invokes a subroutine or sets a property on an ActiveX Automation object. This method is very similar to invokev but does not accept a return value from the method. Some language implementations do not allow invoking subroutines as if they were functions. To avoid problems, use invokeSubv if the method does not return a value. This method is easier to call than the full invokeSubv method but does not allow you to specify the interface IID or the locale, and the method must be identified by name.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method or property by name wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef vArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static void invokeSubv(Object pDispatch, int dispid, int wFlags, Variant vArg[], int uArgErr[])Invokes a subroutine or sets a property on an ActiveX Automation object. This method is very similar to invokev but does not accept a return value from the method. Some language implementations do not allow invoking subroutines as if they were functions. To avoid problems, use invokeSubv if the method does not return a value. This method is easier to call than the full invokeSubv method but does not allow you to specify the interface IID or the locale, and the method must be identified by dispid.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispID identifies the method or property by dispid wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef vArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static Variant invokev(Object pDispatch, _Guid iid, String dispName, int dispID, int lcid, int wFlags, Variant vArg[], int uArgErr[])Invokes a method or accesses a property on an ActiveX Automation object. This method is essentially a direct wrapper around the IDispatch::Invoke method.
Return Value:
Returns The variant returned by the method or property access.
Parameter Description pDispatch Java proxy to ActiveX Automation object. iid identifies interface to call: if null, defaults to IID_IDispatch. dispName identifies the method or property by name: if null, dispID is used. dispID identifies the method or property by dispid: ignored unless dispName is null. lcid locale id. wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef vArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static Variant invokev(Object pDispatch, String dispName, int wFlags, Variant vArg[], int uArgErr[])Invokes a method or accesses a property on an ActiveX Automation object. This method is essentially a direct wrapper around the IDispatch::Invoke method. This method is easier to call than the full invokev method but does not allow you to specify the interface IID or the locale, and the method must be identified by name.
Return Value:
Returns The variant returned by the method or property access.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispName identifies the method or property by name wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef vArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
public static Variant invokev(Object pDispatch, int dispid, int wFlags, Variant vArg[], int uArgErr[])Invokes a method or accesses a property on an ActiveX Automation object. This method is essentially a direct wrapper around the IDispatch::Invoke method. This method is easier to call than the full invokev method but does not allow you to specify the interface IID or the locale, and the method must be identified by dispid.
Return Value:
Returns The variant returned by the method or property access.
Parameter Description pDispatch Java proxy to ActiveX Automation object. dispID identifies the method or property by dispid wFlags access type: one of Dispatch.Method, Dispatch.Get, Dispatch.Put, Dispatch.PutRef vArg the arguments to method or property uArgErr optional one-element array that receives index of offending parameter on error.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.