uLib  User mode C/C++ extended API library for Win32 programmers.

Module Description

Structured exception handling supplements.

Macros

#define __except_execute   __except( EXCEPTION_EXECUTE_HANDLER )
 
#define FACILITY_ULIB   0x800
 
#define MAKE_SOFTEXCEPTION(Severity, Facility, Exception)
 

Macro Definition Documentation

◆ __except_execute

#define __except_execute   __except( EXCEPTION_EXECUTE_HANDLER )

Convenient finger saver

Definition at line 647 of file Common.h.

◆ FACILITY_ULIB

#define FACILITY_ULIB   0x800

Facility code for custom uLib exceptions.

Definition at line 654 of file Common.h.

◆ MAKE_SOFTEXCEPTION

#define MAKE_SOFTEXCEPTION (   Severity,
  Facility,
  Exception 
)
Value:
((DWORD) ( \
/* Severity code */ ((Severity) << 0) | \
/* MS(0) or Cust(1) */ (1 << 29) | \
/* Reserved(0) */ (0 << 28) | \
/* Facility code */ ((Facility) << 16) | \
/* Exception code */ ((Exception) << 0)))
unsigned long DWORD
Definition: Common.h:414

Useful macro for creating your own software exception codes.
Credited to Jeff Richter, MSJ 1995. Example:

#define SE_KILLTHREAD MAKE_SOFTEXCEPTION( ERROR_SEVERITY_ERROR, FACILITY_ULIB, 1 )

Definition at line 662 of file Common.h.