object = Invoke(dispid, lcid , flags , bResultWanted , params, ... )

Invokes a DISPID, using the passed arguments.


dispid : int

The dispid to use. Typically this value will come from PyIDispatch::GetIDsOfNames or from a type library.

lcid : int

The locale id to use.

flags : int

The flags for the call. The following flags can be used.

Flag Description
DISPATCH_METHODThe member is invoked as a method. If a property has the same name, both this and the DISPATCH_PROPERTYGET flag may be set.
DISPATCH_PROPERTYGETThe member is retrieved as a property or data member.
DISPATCH_PROPERTYPUTThe member is changed as a property or data member.
DISPATCH_PROPERTYPUTREFThe member is changed by a reference assignment, rather than a value assignment. This flag is valid only when the property accepts a reference to an object.

bResultWanted : int

Indicates if the result of the call should be requested.

params, ... : object, ...

The parameters to pass.

Return Value

If the bResultWanted parameter is False, then the result will be None. Otherwise, the result is determined by the COM object itself (and may still be None)