Why not use NtTerminateProcess() for non-native apps?
Am 10.01.2013 02:45, schrieb hbelusca(a)svn.reactos.org:
  +/*
 + * Declare a target-dependent process termination procedure.
 + */
 +#ifndef_NTDDK_              /* User-Mode */
 +    #ifndef NTOS_MODE_USER  /* Should be Win32 */
 +        #ifndef _WIN32
 +            #error "Unsupported target."
 +        #else
 +            #define TerminateCurrentProcess(Status)
TerminateProcess(GetCurrentProcess(), (Status))
 +        #endif
 +    #else   /* Native */
 +        #ifndef _PSFUNCS_H
 +            NTSYSCALLAPI
 +            NTSTATUS
 +            NTAPI
 +            NtTerminateProcess(
 +                IN HANDLE ProcessHandle,
 +                IN NTSTATUS ExitStatus
 +            );
 +        #endif
 +        #ifndef NtCurrentProcess
 +            #define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
 +        #endif
 +        #define TerminateCurrentProcess(Status) NtTerminateProcess(NtCurrentProcess(),
(Status))
 +    #endif
 +#else   /* Kernel-Mode */
 +    #include <bugcodes.h>
 +    #define TerminateCurrentProcess(Status) KeBugCheckEx(CRITICAL_SERVICE_FAILED,
(Status), 0, 0, 0)
 +#endif
 +