COMVariant.iDispatch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
iDispatch() |
Gets or sets the value of a COMVariant object of the VT_DISPATCH data type. |
iDispatch(Int64) |
iDispatch()
Gets or sets the value of a COMVariant object of the VT_DISPATCH data type.
public:
virtual long iDispatch();
public virtual long iDispatch ();
abstract member iDispatch : unit -> int64
override this.iDispatch : unit -> int64
Public Overridable Function iDispatch () As Long
Returns
The current value.
Remarks
If you pass in a value that has a different data type than the object, the data type of the object will be changed to match the data type of the value. A COMVariant object has an IDispatch data type if its data type is set to COMVariantType::VT_DISPATCH. The IDispatch data type is a COM data type that provides a handle to a COM IDispatch interface.
The following example creates a new COMVariant object of type VT_DISPATCH.
{
COMVariant var = new COMVariant(
COMVariantInOut::IN_OUT,
COMVariantType::VT_DISPATCH);
COMInterface comInterface;
// Here, the comInterface variable must be assigned
// a COM IDispatch interface
// Add your code here.
// Set value of the object
var.iDispatch(comInterface);
}
Applies to
iDispatch(Int64)
public:
virtual long iDispatch(long _newValue);
public virtual long iDispatch (long _newValue);
abstract member iDispatch : int64 -> int64
override this.iDispatch : int64 -> int64
Public Overridable Function iDispatch (_newValue As Long) As Long
Parameters
- _newValue
- Int64
The new value; optional.