my madRemote cannot remote execute anything

delphi package - getting into other processes
Post Reply
jh092
Posts: 3
Joined: Fri Oct 07, 2005 1:31 am

my madRemote cannot remote execute anything

Post by jh092 »

Hi madshi, been looooooooong time...

I am trying to run RemoteExecute in a foreign process, it does not work at all, the same error each time is

"The system cannot find the file specified (2)"

I am using Windows 7 64 bit Ultimate
I am using Delphi 2010 Architect
My code that I'm trying to remote execute is just "normal" 32 bit
The foreign process is 32 bit
The foreign process is being run with elevated UAC
My code is being run with elevated UAC
I have other code in my exe that performs WriteProcessMemory and that works fine

I have stripped down my remote function to almost nothing and still I get the same error. Here is my nearly nothing function I am trying to RemoteExec:

Code: Select all

function ExecuteTest(buffer: pointer): dword; stdcall;
var
  p1: dword;
  p2: single;
  p3: dword;
begin
  p1 := 4;
  p2 := 1.5;
  p3 := $802;
  result := 12345;
end;
and to do my remote executing I am using this:

Code: Select all

function TTest.RemoteInjectTest: dword;
var
  dummy: dword;
  ph, pid: dword;
begin
  GetWindowThreadProcessId(FTestHandle, @pid);
  ph := OpenProcess(PROCESS_ALL_ACCESS, false, pid);

  dummy := 0;
  if RemoteExecute(ph, @ExecuteTest, dummy) then
    result := dummy
  else begin
    raise Exception.CreateFmt('Remote injection failed. %s (%d)', [ SysErrorMessage(GetLastError), GetLastError ] );
  end;
end;
my pid and pidhandle are valid

I'm completely stuck, can't even do this basic thing and would very much appreciate your help if at all possible. I am a registered user and currently using the latest version.

Thank you so much for your time

John
jh092
Posts: 3
Joined: Fri Oct 07, 2005 1:31 am

Re: my madRemote cannot remote execute anything

Post by jh092 »

I have fixed this now, my error, I did not realize madRemote requires madCHook.dll.

It is now working, sorry for the false alarm.

Thank you

John
madshi
Site Admin
Posts: 10749
Joined: Sun Mar 21, 2004 5:25 pm

Re: my madRemote cannot remote execute anything

Post by madshi »

Do you have a commercial license to madRemote/madCodeHook? The commercial madRemote version does not need madCHook.dll.
Post Reply