CwIsHandleValid

Syntax:

bValid = CwIsHandleValid(hObject)

        bValid          (boolean) True (1) if the given handle is valid,
                        false (0) otherwise.

        hObject         (handle) Any handle.

Description:

This function determines whether a handle is valid. A handle is valid if it refers to something that currently exists. If it refers to a non-existant or deleted object, or if it is the null handle, or if it is not in fact a handle, then it is considered invalid. The function returns true (1) if the handle is valid and false (0) if it is not.

Example:

/* This function behaves exactly like CwGetObjectCount except that it shouldn't
   be called between calls to CwFindFirstObject or CwFindNextObject. */

objcount:procedure
count = 0
o = CwFindFirstObject( CwGetCurrentView() )
do while CwIsHandleValid(o)
        count = count + 1
        o = CwFindNextObject( o )
        end
return o


Functions by NAME

Index

Functions by PURPOSE