The getlasterror method the last UDT error within the same thread.
The last UDT error within the same thread is retrieved and returned in an ERRORINFO structure. If there is no error, a special SUCCESS code (0) will be returned. The getlasterror will always succeed. The returned value is a reference to the internal UDT ERRORINFO structure and application may clear it if necessary.
The getlasterror method reads the last UDT error in the thread where this method is called. The error information is stored in thread specific storage.
Error Code List, Error Handling