Progress
External Program
Interfaces


Validating Component Handles

If you reference a COM-HANDLE variable whose value does not point to a valid COM object, Progress returns an error indicating that an action was performed on an invalid COM-HANDLE. To protect against this error, use the Progress VALID-HANDLE function to determine if the COM-HANDLE variable contains a valid value before using it in any other Progress statement. As with widget handles, the VALID-HANDLE function returns TRUE if the component handle is valid.

Note that you cannot use the VALID-HANDLE function to verify that a component handle value points to a particular COM object. COM-HANDLE values might be reused within an application when the COM objects they point to are no longer available. For more information, see the "Managing COM Object Resources" section.

Also, this function only indicates that a component handle is invalid from some action (or inaction) of the Progress application. It does not show as invalid a COM handle that a user might have manually closed, for example, an Automation Server application that provided the COM object.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095