OS2 API:WinGetLastError

From EDM2

Jump to: navigation, search

Contents

[edit] WinGetLastError

WinGetLastError(anchorHndl) 
Get the error code which was set by the failure of a Presentation Manager function.

[edit] Parameters

anchorHndl - HAB - input 
The anchor block handle.

[edit] Constants

Severity codes defined:

[edit] Returns

Returns ERRORID:

The returned error code is a 32-bit value. The high order 16 bits is a severity code. The low order 16 bits is the error code.

[edit] Module

[edit] Define (C/C++)

INCL_WINERRORS or INCL_PM or INCL_WIN

[edit] Export name/Ordinal

[edit] Calling conversion

Cdecl32

[edit] Example Code

HAB     anchorHndl;
ERRORID rc;
...
rc = WinGetLastError(anchorHndl);
...

[edit] Related Functions

WinFreeErrorInfo WinGetErrorInfo

[edit] Notes

This call retrieves the last error code and resets it to zero.

In multiple threaded applications where there are multiple anchor blocks, errors are stored in the anchor block created by the WinInitialize function of the thread invoking a call. The last error for the process and thread on which this function call is made will be returned.

[edit] OS Version Introduced

Personal tools