The Use of the SetLastErrorEx() API (97926)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows NT 3.1
    • the operating system: Microsoft Windows NT 3.5
    • the operating system: Microsoft Windows NT 3.51
    • Microsoft Windows 95

This article was previously published under Q97926
SetLastErrorEx() is intended for better debugging support, not for passing additional error information.

The SetLastErrorEx() application programming interface (API) differs from the SetLastError() API only in that it raises a debug "RIP" event. The RIP event is intended to give text to the debugger so that the user can retry, ignore, and so forth, these errors. SetLastErrorEx() raises an exception only if SetDebugErrorLevel() has been called by the debugger to allow the errors to be passed on.

The error type can be determined from the debugger by examining the debug event structure that is passed with the event. The debug event structure contains a RIP_INFO substructure.

Modification Type:MajorLast Reviewed:4/13/2004
Keywords:KB97926