ISOBJECT function

Purpose

Determine the current status of a given object variable.

Syntax

oStatus = ISOBJECT(objectvar)

Remarks

ISOBJECT is particularly useful in determining the success or failure of a LET (with Objects) statement.  It returns TRUE (-1) if the object variable contains a valid current reference to an object interface, or FALSE (0) if it contains nothing.

ISOBJECT is the complement to the ISNOTHING function.

Restrictions

objectvar must be an Interface or IDispatch object variable.

See also

DIM, INTERFACE (Direct), INTERFACE (IDBind), ISNOTHING, LET (with Objects), OBJECT, What is an object, anyway?

Example

DIM oApp AS IAPPDatabase

LET oApp = NEWCOM "DBApp.0"

IF ISOBJECT(oApp) AND ISFALSE ERR THEN ' Handle error