This function returns detailed error information.
#define INCL_WINERRORS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PERRINFO perriErrorInfo; /* Error information. */ perriErrorInfo = WinGetErrorInfo(hab);