- define STATUS_* codes correctly in winnt.h and ntstatus.h
authorThomas Bluemel <thomas@reactsoft.com>
Fri, 18 Nov 2005 23:19:48 +0000 (23:19 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Fri, 18 Nov 2005 23:19:48 +0000 (23:19 +0000)
- fix code that incorrectly includes headers for status codes (changes to files shared with wine will be submitted to winehq)
- fix wine SEH macros and support code, these changes should enable us to port crypt32.dll (and maybe other libraries) without modifications

svn path=/trunk/; revision=19334

31 files changed:
reactos/include/wine/exception.h
reactos/lib/crt/precomp.h
reactos/lib/crt/stdlib/malloc.c
reactos/lib/crt/wine/cppexcept.c
reactos/lib/crt/wine/scanf.c
reactos/lib/dbghelp/dbghelp_private.h
reactos/lib/dbghelp/stack.c
reactos/lib/dbghelp/stackframe.h
reactos/lib/dbghelp/thread.h
reactos/lib/dplayx/dplayx_messages.c
reactos/lib/iphlpapi/iphlpapi_private.h
reactos/lib/netapi32/wksta.c
reactos/lib/rpcrt4/rpc_server.c
reactos/lib/rpcrt4/rpcss_np_client.c
reactos/lib/samsrv/samsrv.c
reactos/lib/secur32/dllmain.c
reactos/lib/secur32/lsa.c
reactos/lib/secur32/precomp.h
reactos/lib/secur32/secext.c
reactos/lib/secur32/sspi.c
reactos/lib/setupapi/install.c
reactos/lib/setupapi/setupapi_private.h
reactos/lib/user32/include/user32.h
reactos/regtests/winetests/ntdll/atom.c
reactos/services/dhcp/api.c
reactos/services/dhcp/dhclient.c
reactos/services/dhcp/include/rosdhcp.h
reactos/subsys/system/usetup/usetup.h
reactos/w32api/include/ntdef.h
reactos/w32api/include/ntstatus.h
reactos/w32api/include/winnt.h

index 8308114..26f2f12 100644 (file)
@@ -24,7 +24,6 @@
 #include <setjmp.h>
 #include <windef.h>
 #include <excpt.h>
-#include <wine/port.h>
 
 /* The following definitions allow using exceptions in Wine and Winelib code
  *
@@ -65,8 +64,8 @@
 
 typedef struct _EXCEPTION_REGISTRATION_RECORD
 {
-    struct _EXCEPTION_REGISTRATION_RECORD *prev;
-    PEXCEPTION_HANDLER handler;
+    struct _EXCEPTION_REGISTRATION_RECORD *Prev;
+    PEXCEPTION_HANDLER Handler;
 } EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
 
 /* Define this if you want to use your compiler built-in __try/__except support.
@@ -101,7 +100,7 @@ typedef struct _EXCEPTION_REGISTRATION_RECORD
              __f.frame.Handler = __wine_exception_handler; \
              __f.u.filter = (func); \
              __wine_push_frame( &__f.frame ); \
-             if (sigsetjmp( __f.jmp, 1 )) { \
+             if (setjmp( __f.jmp )) { \
                  const __WINE_FRAME * const __eptr __attribute__((unused)) = &__f; \
                  do {
 
@@ -130,8 +129,8 @@ typedef struct _EXCEPTION_REGISTRATION_RECORD
 typedef DWORD (CALLBACK *__WINE_FILTER)(PEXCEPTION_POINTERS);
 typedef void (CALLBACK *__WINE_FINALLY)(BOOL);
 
-#define WINE_EXCEPTION_FILTER(func) DWORD WINAPI func( EXCEPTION_POINTERS *__eptr )
-#define WINE_FINALLY_FUNC(func) void WINAPI func( BOOL __normal )
+#define WINE_EXCEPTION_FILTER(func) DWORD CALLBACK func( PEXCEPTION_POINTERS __eptr )
+#define WINE_FINALLY_FUNC(func) void CALLBACK func( BOOL __normal )
 
 #define GetExceptionInformation() (__eptr)
 #define GetExceptionCode()        (__eptr->ExceptionRecord->ExceptionCode)
@@ -149,17 +148,12 @@ typedef struct __tagWINE_FRAME
         /* finally data */
         __WINE_FINALLY finally_func;
     } u;
-    sigjmp_buf jmp;
+    jmp_buf jmp;
     /* hack to make GetExceptionCode() work in handler */
     DWORD ExceptionCode;
     const struct __tagWINE_FRAME *ExceptionRecord;
 } __WINE_FRAME;
 
-extern DWORD __wine_exception_handler( PEXCEPTION_RECORD record, EXCEPTION_REGISTRATION_RECORD *frame,
-                                       CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher );
-extern DWORD __wine_finally_handler( PEXCEPTION_RECORD record, EXCEPTION_REGISTRATION_RECORD *frame,
-                                     CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher );
-
 #endif /* USE_COMPILER_EXCEPTIONS */
 
 static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame )
@@ -183,8 +177,8 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTR
 {
 #if defined(__GNUC__) && defined(__i386__)
     __asm__ __volatile__(".byte 0x64\n\tmovl %0,(0)"
-                         : : "r" (frame->prev) : "memory" );
-    return frame->prev;
+                         : : "r" (frame->Prev) : "memory" );
+    return frame->Prev;
 
 #else
     NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
@@ -193,6 +187,59 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTR
 #endif
 }
 
+#ifndef USE_COMPILER_EXCEPTIONS
+
+extern VOID NTAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
+
+static __inline EXCEPTION_DISPOSITION
+__wine_exception_handler( struct _EXCEPTION_RECORD *record, void *frame,
+                          struct _CONTEXT *context, void *pdispatcher )
+{
+    __WINE_FRAME *wine_frame = (__WINE_FRAME *)frame;
+
+    if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL))
+        return ExceptionContinueSearch;
+    if (wine_frame->u.filter)
+    {
+        EXCEPTION_POINTERS ptrs;
+        ptrs.ExceptionRecord = record;
+        ptrs.ContextRecord = context;
+        switch(wine_frame->u.filter( &ptrs ))
+        {
+        case EXCEPTION_CONTINUE_SEARCH:
+            return ExceptionContinueSearch;
+        case EXCEPTION_CONTINUE_EXECUTION:
+            return ExceptionContinueExecution;
+        case EXCEPTION_EXECUTE_HANDLER:
+            break;
+        default:
+            break;
+        }
+    }
+    /* hack to make GetExceptionCode() work in handler */
+    wine_frame->ExceptionCode   = record->ExceptionCode;
+    wine_frame->ExceptionRecord = wine_frame;
+
+    RtlUnwind( frame, 0, record, 0 );
+    __wine_pop_frame( frame );
+    longjmp( wine_frame->jmp, 1 );
+}
+
+
+static __inline EXCEPTION_DISPOSITION
+__wine_finally_handler( struct _EXCEPTION_RECORD *record, void *frame,
+                        struct _CONTEXT *context, void *pdispatcher )
+{
+    if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
+    {
+        __WINE_FRAME *wine_frame = (__WINE_FRAME *)frame;
+        wine_frame->u.finally_func( FALSE );
+    }
+    return ExceptionContinueSearch;
+}
+
+#endif /* USE_COMPILER_EXCEPTIONS */
+
 
 /* Wine-specific exceptions codes */
 
index 3aea404..b13bd38 100644 (file)
@@ -1,6 +1,9 @@
 #define CRT_SECURE_NO_DEPRECATE
 
+#define WIN32_NO_STATUS
 #include <windows.h>
+#define NTOS_MODE_USER
+#include <ndk/ntndk.h>
 
 #if !defined(_MSC_VER)
   #include <stdint.h>
index b1227a5..74a7bf5 100644 (file)
@@ -26,9 +26,6 @@
 #include <malloc.h>
 
 
-/* fixme: should have this in common header */
-#define ROUND_UP(a,b) ((a + (b-1)) & ~(b-1))
-
 /* round to 16 bytes + alloc at minimum 16 bytes */
 #define ROUND_SIZE(size) (max(16, ROUND_UP(size, 16)))
 
index c6c98ee..5049a93 100644 (file)
@@ -303,7 +303,7 @@ __inline static void *call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_fra
             /* setup an exception block for nested exceptions */
 
             //nested_frame.frame.Handler = catch_function_nested_handler;
-            nested_frame.frame.handler = (PEXCEPTION_HANDLER)catch_function_nested_handler;
+            nested_frame.frame.Handler = (PEXCEPTION_HANDLER)catch_function_nested_handler;
             nested_frame.prev_rec  = thread_data->exc_record;
             nested_frame.cxx_frame = frame;
             nested_frame.descr     = descr;
index f41dd61..3667f7b 100644 (file)
@@ -35,8 +35,6 @@
 */
 #include "precomp.h"
 
-#define WIN32_NO_STATUS
-
 #include <stdarg.h>
 #include <wchar.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <internal/file.h>
 
-#include <windows.h>
-#define NTOS_MODE_USER
-#include <ndk/umtypes.h>
-#include <ndk/extypes.h>
-#include <ndk/rtlfuncs.h>
-
 #define NDEBUG
 #include <internal/debug.h>
 
index 8ac44c5..49d48c7 100644 (file)
@@ -21,6 +21,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define WIN32_NO_STATUS
 #include <stdarg.h>
 #include "windef.h"
 #include "winbase.h"
index fc9c602..ce2f1af 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "dbghelp_private.h"
 #include "winreg.h"
-#include "ntstatus.h"
 #include "thread.h" /* FIXME: must be included before winternl.h */
 #include "wine/debug.h"
 #include "stackframe.h"
index b709d0b..63dd983 100644 (file)
@@ -22,7 +22,6 @@
 #define __WINE_STACKFRAME_H
 
 #include <string.h>
-#include <winnt.h>
 #define NTOS_MODE_USER
 #include <ndk/umtypes.h>
 #include <ndk/extypes.h>
index 7d617f8..3ee2f8d 100644 (file)
@@ -22,6 +22,7 @@
 #define __WINE_THREAD_H
 
 #include <stdarg.h>
+#define WIN32_NO_STATUS
 #include <windef.h>
 #include <winbase.h>
 #include <winreg.h>
index 2b248af..030d3e7 100644 (file)
@@ -27,7 +27,6 @@
 #include "wingdi.h"
 #include "winuser.h"
 #include "winerror.h"
-#include "ntstatus.h"
 
 #include "dplayx_messages.h"
 #include "dplay_global.h"
index a0fe59d..4d4fb1e 100644 (file)
@@ -21,6 +21,7 @@
 
 #undef _WIN32_WINNT
 #define _WIN32_WINNT 0x500
+#define WIN32_NO_STATUS
 #include <windows.h>
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>
index 6dd7c55..ebf4550 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <stdarg.h>
 #include <stdlib.h>
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
 #include "windef.h"
 #include "winbase.h"
 #include "winsock2.h"
@@ -33,9 +35,8 @@
 #include "lmwksta.h"
 #include "iphlpapi.h"
 #include "winerror.h"
-#include "ntstatus.h"
-#include "winreg.h"
 #include "ntsecapi.h"
+#include "winreg.h"
 #include "netbios.h"
 #include "wine/debug.h"
 
index 60a4c4e..d220071 100644 (file)
@@ -34,7 +34,6 @@
 #include "winbase.h"
 #include "winerror.h"
 #include "winreg.h"
-#include "ntstatus.h"
 
 #include "rpc.h"
 #include "rpcndr.h"
index 78d675e..3906f21 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "windef.h"
 #include "winbase.h"
-#include "ntstatus.h"
 #include "wine/rpcss_shared.h"
 #include "wine/debug.h"
 
index ffd2aa3..34e08df 100644 (file)
@@ -19,6 +19,7 @@
 \r
 /* INCLUDES *****************************************************************/\r
 \r
+#define WIN32_NO_STATUS\r
 #include <windows.h>\r
 #define NTOS_MODE_USER\r
 #include <ndk/ntndk.h>\r
index ce85eb7..11f8ed7 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 /* INCLUDES ******************************************************************/
-#include "precomp.h"
+#include <precomp.h>
 
 /* GLOBALS *******************************************************************/
 
index 1c5434a..49d5834 100644 (file)
@@ -10,7 +10,7 @@
 
 /* INCLUDES ******************************************************************/
 
-#include "precomp.h"
+#include <precomp.h>
 
 /* GLOBALS *******************************************************************/
 
index 6de28a6..59e9c01 100644 (file)
@@ -16,3 +16,6 @@
 #include <lsass/lsass.h>\r
 \r
 #include <ntsecapi.h>\r
+#include <secext.h>\r
+#include <security.h>\r
+#include <sspi.h>\r
index 178aa8a..b559912 100644 (file)
@@ -1,14 +1,8 @@
-#include <windows.h>
-#define NTOS_MODE_USER
-#include <ndk/ntndk.h>
-#include <lsass/lsass.h>
+#include <precomp.h>
 
 #define NDEBUG
 #include <debug.h>
 
-#include <ntsecapi.h>
-#include <secext.h>
-
 
 BOOLEAN
 WINAPI
index 1bfa034..b015257 100644 (file)
@@ -1,16 +1,8 @@
-#include <windows.h>
-#define NTOS_MODE_USER
-#include <ndk/ntndk.h>
-#include <lsass/lsass.h>
+#include <precomp.h>
 
 #define NDEBUG
 #include <debug.h>
 
-#include <ntsecapi.h>
-#include <security.h>
-#include <sspi.h>
-
-
 
 SECURITY_STATUS
 WINAPI
index 562804d..07a57e5 100644 (file)
@@ -1041,6 +1041,10 @@ static BOOL GetIntField( HINF hinf, PCWSTR section_name, PCWSTR key_name, INT *v
  */
 BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname, DWORD flags, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PVOID reserved1, PVOID reserved2 )
 {
+    SC_HANDLE hSCManager = NULL;
+    SC_HANDLE hService = NULL;
+    LPDWORD GroupOrder = NULL;
+    LPQUERY_SERVICE_CONFIG ServiceConfig = NULL;
     struct DeviceInfoSet *list;
     BOOL ret = FALSE;
 
@@ -1065,16 +1069,12 @@ BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname
     }
     else
     {
-        SC_HANDLE hSCManager = NULL;
-        SC_HANDLE hService = NULL;
         HKEY hGroupOrderListKey = INVALID_HANDLE_VALUE;
-        LPQUERY_SERVICE_CONFIG ServiceConfig = NULL;
         LPWSTR ServiceBinary = NULL;
         LPWSTR LoadOrderGroup = NULL;
         LPWSTR DisplayName = NULL;
         LPWSTR Description = NULL;
         LPWSTR Dependencies = NULL;
-        LPDWORD GroupOrder = NULL;
         INT ServiceType, StartType, ErrorControl;
         DWORD dwRegType;
         DWORD tagId = (DWORD)-1;
index fec4b81..b8f366e 100644 (file)
@@ -24,6 +24,7 @@
 #include <fcntl.h>
 #include <share.h>
 
+#define WIN32_NO_STATUS
 #include <windows.h>
 #include <cfgmgr32.h>
 #include <fdi.h>
index f7d7a66..59b7006 100644 (file)
@@ -16,6 +16,7 @@
 #define _USER32_
 #define OEMRESOURCE
 #define NTOS_MODE_USER
+#define WIN32_NO_STATUS
 #include <windows.h>
 #include <windowsx.h>
 #include <winnls32.h>
index a1ac321..e2563df 100755 (executable)
@@ -25,8 +25,9 @@
 
 #include <stdio.h>
 #include <stdarg.h>
-#include "windows.h"
 #include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windows.h"
 #include "wine/test.h"
 #include "wine/unicode.h"
 #include "winternl.h"
index ca628bb..0551914 100644 (file)
@@ -7,9 +7,9 @@
  * PROGRAMMER:       arty
  */
 
+#include "rosdhcp.h"
 #include <winsock2.h>
 #include <iphlpapi.h>
-#include "rosdhcp.h"
 
 static CRITICAL_SECTION ApiCriticalSection;
 
index 6623a30..799b3c6 100644 (file)
@@ -53,8 +53,8 @@
  * purpose.
  */
 
-#include <winsock2.h>
 #include "rosdhcp.h"
+#include <winsock2.h>
 #include "dhcpd.h"
 #include "privsep.h"
 
index 1efc5b3..7970ee0 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef ROSDHCP_H
 #define ROSDHCP_H
 
+#define WIN32_NO_STATUS
 #include <windows.h>
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>
index 191f8b1..02b99bb 100644 (file)
@@ -33,6 +33,7 @@
 #include <stddef.h>
 
 /* PSDK/NDK */
+#define WIN32_NO_STATUS
 #include <windows.h>
 #include <fmifs/fmifs.h>
 #define NTOS_MODE_USER
index 0b1112c..161267b 100644 (file)
@@ -34,7 +34,6 @@
 }
 #ifndef NT_SUCCESS
 #define NT_SUCCESS(x) ((x)>=0)
-#define STATUS_SUCCESS ((NTSTATUS)0)
 #endif
 #define NT_WARNING(x) ((ULONG)(x)>>30==2)
 #define NT_ERROR(x) ((ULONG)(x)>>30==3)
index 4e962a5..d36f97c 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef __WINE_NTSTATUS_H
-#define __WINE_NTSTATUS_H
+#ifndef _NTSTATUS_
+#define _NTSTATUS_
 
 #ifndef WIN32_NO_STATUS
+
 /*
  * Debug codes
  */
-#define DBG_PRINTEXCEPTION_C             ((NTSTATUS)0x40010006L)
-#define DBG_CONTROL_C                    ((NTSTATUS)0x40010005L)
-#define DBG_CONTROL_BREAK                ((NTSTATUS)0x40010008L)
+
+#define DBG_EXCEPTION_HANDLED            ((NTSTATUS)0x00010001)
+#define DBG_CONTINUE                     ((NTSTATUS)0x00010002)
+#define DBG_REPLY_LATER                  ((NTSTATUS)0x40010001)
+#define DBG_UNABLE_TO_PROVIDE_HANDLE     ((NTSTATUS)0x40010002)
+#define DBG_TERMINATE_THREAD             ((NTSTATUS)0x40010003)
+#define DBG_TERMINATE_PROCESS            ((NTSTATUS)0x40010004)
+#define DBG_CONTROL_C                    ((NTSTATUS)0x40010005)
+#define DBG_PRINTEXCEPTION_C             ((NTSTATUS)0x40010006)
+#define DBG_RIPEXCEPTION                 ((NTSTATUS)0x40010007)
+#define DBG_CONTROL_BREAK                ((NTSTATUS)0x40010008)
+#define DBG_COMMAND_EXCEPTION            ((NTSTATUS)0x40010009)
+#define DBG_EXCEPTION_NOT_HANDLED        ((NTSTATUS)0x80010001)
+#define DBG_NO_STATE_CHANGE              ((NTSTATUS)0xC0010001)
+#define DBG_APP_NOT_IDLE                 ((NTSTATUS)0xC0010002)
 
 /*
  * Exception codes
 
 #endif /* WIN32_NO_STATUS */
 
-#endif /* __WINE_NTSTATUS_H */
+#endif /* _NTSTATUS_ */
index 08281be..c780ec7 100644 (file)
@@ -210,9 +210,54 @@ typedef DWORD FLONG;
 #define SPECIFIC_RIGHTS_ALL    0xFFFF
 #define ACCESS_SYSTEM_SECURITY 0x1000000
 
-#ifndef WIN32_NO_STATUS 
-#define DBG_CONTINUE            ((DWORD)0x00010002L)
-#endif
+#ifndef WIN32_NO_STATUS
+
+#define STATUS_WAIT_0                    ((DWORD)0x00000000)
+#define STATUS_ABANDONED_WAIT_0          ((DWORD)0x00000080)
+#define STATUS_USER_APC                  ((DWORD)0x000000C0)
+#define STATUS_TIMEOUT                   ((DWORD)0x00000102)
+#define STATUS_PENDING                   ((DWORD)0x00000103)
+#define STATUS_SEGMENT_NOTIFICATION      ((DWORD)0x40000005)
+#define STATUS_GUARD_PAGE_VIOLATION      ((DWORD)0x80000001)
+#define STATUS_DATATYPE_MISALIGNMENT     ((DWORD)0x80000002)
+#define STATUS_BREAKPOINT                ((DWORD)0x80000003)
+#define STATUS_SINGLE_STEP               ((DWORD)0x80000004)
+#define STATUS_ACCESS_VIOLATION          ((DWORD)0xC0000005)
+#define STATUS_IN_PAGE_ERROR             ((DWORD)0xC0000006)
+#define STATUS_INVALID_HANDLE            ((DWORD)0xC0000008)
+#define STATUS_NO_MEMORY                 ((DWORD)0xC0000017)
+#define STATUS_ILLEGAL_INSTRUCTION       ((DWORD)0xC000001D)
+#define STATUS_NONCONTINUABLE_EXCEPTION  ((DWORD)0xC0000025)
+#define STATUS_INVALID_DISPOSITION       ((DWORD)0xC0000026)
+#define STATUS_ARRAY_BOUNDS_EXCEEDED     ((DWORD)0xC000008C)
+#define STATUS_FLOAT_DENORMAL_OPERAND    ((DWORD)0xC000008D)
+#define STATUS_FLOAT_DIVIDE_BY_ZERO      ((DWORD)0xC000008E)
+#define STATUS_FLOAT_INEXACT_RESULT      ((DWORD)0xC000008F)
+#define STATUS_FLOAT_INVALID_OPERATION   ((DWORD)0xC0000090)
+#define STATUS_FLOAT_OVERFLOW            ((DWORD)0xC0000091)
+#define STATUS_FLOAT_STACK_CHECK         ((DWORD)0xC0000092)
+#define STATUS_FLOAT_UNDERFLOW           ((DWORD)0xC0000093)
+#define STATUS_INTEGER_DIVIDE_BY_ZERO    ((DWORD)0xC0000094)
+#define STATUS_INTEGER_OVERFLOW          ((DWORD)0xC0000095)
+#define STATUS_PRIVILEGED_INSTRUCTION    ((DWORD)0xC0000096)
+#define STATUS_STACK_OVERFLOW            ((DWORD)0xC00000FD)
+#define STATUS_CONTROL_C_EXIT            ((DWORD)0xC000013A)
+#define STATUS_FLOAT_MULTIPLE_FAULTS     ((DWORD)0xC00002B4)
+#define STATUS_FLOAT_MULTIPLE_TRAPS      ((DWORD)0xC00002B5)
+#define STATUS_REG_NAT_CONSUMPTION       ((DWORD)0xC00002C9)
+#define STATUS_SXS_EARLY_DEACTIVATION    ((DWORD)0xC015000F)
+#define STATUS_SXS_INVALID_DEACTIVATION  ((DWORD)0xC0150010)
+
+#define DBG_EXCEPTION_HANDLED       ((DWORD)0x00010001)
+#define DBG_CONTINUE                ((DWORD)0x00010002)
+#define DBG_TERMINATE_THREAD        ((DWORD)0x40010003)
+#define DBG_TERMINATE_PROCESS       ((DWORD)0x40010004)
+#define DBG_CONTROL_C               ((DWORD)0x40010005)
+#define DBG_CONTROL_BREAK           ((DWORD)0x40010008)
+#define DBG_COMMAND_EXCEPTION       ((DWORD)0x40010009)
+#define DBG_EXCEPTION_NOT_HANDLED   ((DWORD)0x80010001)
+
+#endif /* WIN32_NO_STATUS */
 
 #define MAXIMUM_ALLOWED        0x2000000
 #define GENERIC_READ   0x80000000