Here is the injection code.
Code: Select all
for i1 := 0 to high(pl) do
begin
if GetCurrentProcessID = pl[i1].id then Continue;
if dNtSysCall.IsProtectedProcess(pl[i1].id) then Continue;
hOpen := OpenProcess(PROCESS_ALL_ACCESS ,false , pl[i1].id);
if Is64BitProcess(hOpen) then
begin
if not InjectLibraryW('PSGG64.dll', hOpen, 1) then
begin
Memo1.Lines.Add(Format('64 Process [%s] failed to inject', [pl[i1].exeFile]));
end
else
begin
Memo1.Lines.Add(Format('64 Process [%s] injetacted', [pl[i1].exeFile]));
end;
end
else
begin
if not InjectLibraryW('PSGG32.dll', hOpen, 1) then
begin
Memo1.Lines.Add(Format('32 Process [%s] failed to inject', [pl[i1].exeFile]));
end
else
begin
Memo1.Lines.Add(Format('32 Process [%s] injetacted', [pl[i1].exeFile]));
end;
end;
CloseHandle(hOpen);
end;
Code: Select all
library Project1;
uses
System.SysUtils,
System.Classes;
begin
end.