IsNullCOMObject
See Also: FlexCOM Helper Functions, IsComObject, IsComObjectCreated, pvComObject
Purpose
Returns True if the passed variable or property is of type variant IDispatch* and is set to NULL. Returns False if the passed value is a non-NULL IDispatch* value.
Return Type
Syntax
(IsNullComObject({vComObject}))
Parameters
- vComObject: A value of type variant.
What it Does
This Boolean function returns True if the passed variable or property is of type variant IDispatch* and is set to NULL. It will return False if the passed value is a non-NULL IDispatch* value.
Use this function instead of attempting to use an IDispatch* variant in a comparative expression like (vComObject = 0). Such an expression would never work and would raise a runtime error.
Example
The following example tests a variant variable using IsNullComObject to see if it is a Null IDispatch*.
Variant vMyVar
// ...
If (Not(IsNullComObject(vMyVar))) Begin
Move (NullComObject()) To vMyVar
End