pvComObject - DfInPlaceComObject

Returns an IDispatch pointer to the external COM object

Type: Property

Access: Read/Write

Data Type: Variant

Parameters: None

Syntax
 Property Variant pvComObject

Read Access: Get pvComObject to VariantVariable
Write Access: Set pvComObject to VariantVariable/Value


Description

pvComObject is a variant property which returns an IDispatch pointer to the external COM object.

Setting this property to the correct IDispatch* value connects a DataFlex wrapper object to its corresponding external COM object and increments the COM object's reference count.

Changing the pvComObject property or setting it to NULL (using the NullComObject function) automatically releases any reference to the IDispatch pointed to by the old property value. Destroying the DataFlex wrapper object also automatically releases the reference to the COM object.

This property is automatically assigned and released when sending CreateComObject and ReleaseComObject.

Variant-type variables can be used to store IDispatch* values.
Note:The DataFlex runtime protects against pointer arithmetic and comparison expressions for variant variables containing an IDispatch*. Doing so would raise a runtime error. The helper functions IsNullComObject and IsSameComObject can be used to perform any operations that you would normally require on variants containing IDispatch* values.

See Also

cComActiveXControl