win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinGetLastError (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINERRORS
 
ERRORID WinGetLastError(hab)
HAB hab;    /* handle of the anchor block */
 
The WinGetLastError function returns the error state set by the failure of a
Presentation Manager function. This function returns the last nonzero error
code and sets the error code to zero.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hab        Identifies the anchor block.
 
Return Value
 
The return value is the last error code.
 
Comments
 
In multiple-thread applications where there are multiple anchor blocks,
errors are stored in the anchor block created by the WinInitialize function
of the thread. The application must specify the correct anchor-block value
for the thread calling WinGetLastError.
 
See Also
 
WinGetErrorInfo, WinInitialize, ERRORIDERROR