win12.hlp (Table of Contents; Topic list)
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