Index: include/asm/genincdata.c =================================================================== --- include/asm/genincdata.c (revision 66661) +++ include/asm/genincdata.c (working copy) @@ -2,6 +2,7 @@ #include /* DDK/IFS/NDK Headers */ +#define _NTSYSTEM_ #include #include #include Index: include/ddk/ntddk.h =================================================================== --- include/ddk/ntddk.h (revision 66661) +++ include/ddk/ntddk.h (working copy) @@ -1939,6 +1939,12 @@ * Kernel Types * ******************************************************************************/ +typedef struct _EXCEPTION_REGISTRATION_RECORD +{ + struct _EXCEPTION_REGISTRATION_RECORD *Next; + PEXCEPTION_ROUTINE Handler; +} EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD; + typedef struct _NT_TIB { struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; PVOID StackBase; Index: include/ddk/wdm.h =================================================================== --- include/ddk/wdm.h (revision 66661) +++ include/ddk/wdm.h (working copy) @@ -1151,6 +1151,7 @@ KD_OPTION_SET_BLOCK_ENABLE, } KD_OPTION; +#ifdef _NTSYSTEM_ typedef VOID (NTAPI *PKNORMAL_ROUTINE)( IN PVOID NormalContext OPTIONAL, @@ -1168,6 +1169,7 @@ IN OUT PVOID *NormalContext OPTIONAL, IN OUT PVOID *SystemArgument1 OPTIONAL, IN OUT PVOID *SystemArgument2 OPTIONAL); +#endif typedef struct _KAPC { UCHAR Type; @@ -1177,9 +1179,13 @@ ULONG SpareLong0; struct _KTHREAD *Thread; LIST_ENTRY ApcListEntry; +#ifdef _NTSYSTEM_ PKKERNEL_ROUTINE KernelRoutine; PKRUNDOWN_ROUTINE RundownRoutine; PKNORMAL_ROUTINE NormalRoutine; +#else + PVOID Reserved[3]; +#endif PVOID NormalContext; PVOID SystemArgument1; PVOID SystemArgument2; Index: include/ndk/halfuncs.h =================================================================== --- include/ndk/halfuncs.h (revision 66661) +++ include/ndk/halfuncs.h (working copy) @@ -52,16 +52,6 @@ #define KdUnmapVirtualAddress HALPRIVATEDISPATCH->KdUnmapVirtualAddress // -// The DDK steals these away from you. -// -#ifdef _MSC_VER -void __cdecl _enable(void); -void __cdecl _disable(void); -#pragma intrinsic(_enable) -#pragma intrinsic(_disable) -#endif - -// // Display Functions // NTHALAPI Index: include/ndk/ketypes.h =================================================================== --- include/ndk/ketypes.h (revision 66661) +++ include/ndk/ketypes.h (working copy) @@ -538,6 +538,26 @@ PVOID StartContext ); +#ifndef _NTSYSTEM_ +typedef VOID +(NTAPI *PKNORMAL_ROUTINE)( + IN PVOID NormalContext OPTIONAL, + IN PVOID SystemArgument1 OPTIONAL, + IN PVOID SystemArgument2 OPTIONAL); + +typedef VOID +(NTAPI *PKRUNDOWN_ROUTINE)( + IN struct _KAPC *Apc); + +typedef VOID +(NTAPI *PKKERNEL_ROUTINE)( + IN struct _KAPC *Apc, + IN OUT PKNORMAL_ROUTINE *NormalRoutine OPTIONAL, + IN OUT PVOID *NormalContext OPTIONAL, + IN OUT PVOID *SystemArgument1 OPTIONAL, + IN OUT PVOID *SystemArgument2 OPTIONAL); +#endif + // // APC Environment Types // Index: include/ndk/rtltypes.h =================================================================== --- include/ndk/rtltypes.h (revision 66661) +++ include/ndk/rtltypes.h (working copy) @@ -850,11 +850,6 @@ } TIME_FIELDS, *PTIME_FIELDS; // -// Activation Context -// -typedef PVOID PACTIVATION_CONTEXT; - -// // Activation Context Frame // typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME @@ -1199,6 +1194,7 @@ PRTL_HANDLE_TABLE_ENTRY MaxReservedHandles; } RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE; +#ifdef NTOS_MODE_USER // // Exception Record // @@ -1207,6 +1203,7 @@ struct _EXCEPTION_REGISTRATION_RECORD *Next; PEXCEPTION_ROUTINE Handler; } EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD; +#endif /* NTOS_MODE_USER */ // // Current Directory Structures Index: include/xdk/ketypes.h =================================================================== --- include/xdk/ketypes.h (revision 66661) +++ include/xdk/ketypes.h (working copy) @@ -476,6 +476,7 @@ KD_OPTION_SET_BLOCK_ENABLE, } KD_OPTION; +#ifdef _NTSYSTEM_ typedef VOID (NTAPI *PKNORMAL_ROUTINE)( IN PVOID NormalContext OPTIONAL, @@ -493,6 +494,7 @@ IN OUT PVOID *NormalContext OPTIONAL, IN OUT PVOID *SystemArgument1 OPTIONAL, IN OUT PVOID *SystemArgument2 OPTIONAL); +#endif typedef struct _KAPC { UCHAR Type; @@ -502,9 +504,13 @@ ULONG SpareLong0; struct _KTHREAD *Thread; LIST_ENTRY ApcListEntry; +#ifdef _NTSYSTEM_ PKKERNEL_ROUTINE KernelRoutine; PKRUNDOWN_ROUTINE RundownRoutine; PKNORMAL_ROUTINE NormalRoutine; +#else + PVOID Reserved[3]; +#endif PVOID NormalContext; PVOID SystemArgument1; PVOID SystemArgument2; @@ -993,6 +999,12 @@ $endif (_WDMDDK_) $if (_NTDDK_) +typedef struct _EXCEPTION_REGISTRATION_RECORD +{ + struct _EXCEPTION_REGISTRATION_RECORD *Next; + PEXCEPTION_ROUTINE Handler; +} EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD; + typedef struct _NT_TIB { struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; PVOID StackBase;