ISOBJECT

Purpose:

Returns 1 if input parameter is a handle to an ActiveX object.

Syntax:

ISOBJECT(val)

val

-

A series, scalar or string input.

Returns:

The scalar 1 if the input is a handle to an ActiveX object, else 0.

Example:

d = getobject();

isobject(d)

 

returns 1

 

A reference to the current running DADiSP is created.

Example:

ie  = createobject("internetexplorer.application");

ie2 = ie;

 

isobject(ie)

 

returns 1

 

isobject(ie2)

 

returns 1

 

The Internet Explorer object is created and a second reference to the object is copied to the variable ie2.

Example:

word = createobject("word.application");

a = isobject(word);

 

release(word);

b = isobject(word);

 

a == 1

b == 0

 

After the word object is created, RELEASE removes the object.

Example:

isobject("excel.application")

 

returns 1 if the Excel automation server is registered in the registry, else 0. The Excel automation server is not instantiated.

Example:

x = 100;

isobject(x)

 

returns 0

Remarks:

If the input is a string, the string is assumed to be the ProgID of an ActiveX server object and the registry is searched for the corresponding CLSID. Only the registry is searched, the server is not started.

 

For all other input, if the input is not a handle to a running ActiveX object, isobject returns 0.

See Also:

CREATEOBJECT

GETOBJECT

RELEASE