Status Reporting by the User Interface Library
The User Interface Library routines return negative values when they detect errors. Some functions, such as LoadPanel, return positive values for a successful completion. You can use the GetUILErrorString function to get the error message associated with each User Interface Library error code.