View Single Post
  #1  
Old 09-05-2004, 00:27
Teerayoot Teerayoot is offline
Friend
 
Join Date: Mar 2004
Location: ประเทศไทย
Posts: 83
Rept. Given: 0
Rept. Rcvd 3 Times in 2 Posts
Thanks Given: 2
Thanks Rcvd at 16 Times in 8 Posts
Teerayoot Reputation: 3
ZwTerminateProcess

*From "Window Nt Native API Reference"
Quote:
ZwTerminateProcess terminates a process and the threads that it contains.
NTSYSAPI
NTSTATUS
NTAPI
ZwTerminateProcess(
IN HANDLE ProcessHandle OPTIONAL,
IN NTSTATUS ExitStatus
);
////////////////////////////////////////////////////////

I try to using this function but the process do not terminate ,here is my code snippet

//// Global ////
Quote:
#define NTSTATUS ULONG
typedef
NTSYSAPI
NTSTATUS
NTAPI
(*ZwTerminateProcess)(
IN HANDLE ProcessHandle OPTIONAL,
IN NTSTATUS ExitStatus
);
ZwTerminateProcess fZwTerminateProcess;
//// Use ////
Quote:
fZwTerminateProcess = (ZwTerminateProcess)GetProcAddress(GetModuleHandleA("ntdll.dll"),"ZwTerminateProcess");
fZwTerminateProcess(NULL,1);
All compiling made sucessfull ,but when the process do not terminate.
Do i make somethings wrong?
Reply With Quote