1
I’m trying to suspend a lawsuit from windows
for Delphi
, but without success, I am using the following code:
function SuspendProcess(pid:dword):boolean; // Suspende processo pelo PID
var module,module1:thandle;
SusPendProcess:TNTdllApi;
begin
result := false;
SetTokenPrivileges;
module := LoadLibrary('ntdll.dll');
@SusPendProcess := Getprocaddress(module,'NtSuspendProcess');
if @SusPendProcess <> nil then
begin
module1 := OpenProcess(PROCESS_ALL_ACCESS,FALSE,pid);
SusPendProcess(module1);
end;
end;
Where do I inform the PID
, but nothing happens, now using the tool PC Hunter
, he suspends without a problem.
It would be possible to make use of the PSSuspendProcess/ZwSuspendProcess
?
Could you help me with an example? Thank you!