This function returns the error code set by the failure of a Presentation Manager function.
#define INCL_WINERRORS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ ERRORID erridErrorCode; /* Last error code. */ erridErrorCode = WinGetLastError(hab);