UnrealSkill-VIP
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

[Source] Process Suspend / Resume function

Ir em baixo

[Source] Process Suspend / Resume function Empty [Source] Process Suspend / Resume function

Mensagem por uNreal 11/7/2020, 00:02

Código:
function OpenThread(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
dwThreadId: DWORD): THandle; stdcall; external kernel32;

Código:
Procedure SuspendProcess( PID : DWORD );
const
THREAD_SUSPEND_RESUME = $0002;
var
nThread : THREADENTRY32;
i,j : integer;
hSnap,hThread : THandle;
Return : Boolean;
begin
hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD,0);
if hSnap = 0 then
Exit;
nThread.dwSize := SizeOf(nThread);
Return := Thread32First(hSnap,nThread);
while Return do
begin
if nThread.th32OwnerProcessID = PID then
begin
hThread := OpenThread(THREAD_SUSPEND_RESUME,False,nThread.th3 2ThreadID);
SuspendThread(hThread);
end;
Return := Thread32Next(hSnap,nThread);
end;
end;

Código:
Procedure ResumeProcess( PID : DWORD);
const
THREAD_SUSPEND_RESUME = $0002;
var
nThread : THREADENTRY32;
i,j : integer;
hSnap,hThread : THandle;
Return : Boolean;
begin
hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD,0);
if hSnap = 0 then
Exit;
nThread.dwSize := SizeOf(nThread);
Return := Thread32First(hSnap,nThread);
while Return do
begin
if nThread.th32OwnerProcessID = PID then
begin
hThread := OpenThread(THREAD_SUSPEND_RESUME,False,nThread.th3 2ThreadID);
ResumeThread(hThread);
end;
Return := Thread32Next(hSnap,nThread);
end;
end;
uNreal
uNreal
ADM
ADM


Voltar ao Topo Ir em baixo

Voltar ao Topo


 
Permissão neste fórum:
Você não pode responder aos tópicos neste fórum