Remote Execution or Inject with semaphores? best practices.

delphi package - getting into other processes
Post Reply
Azmodeus
Posts: 60
Joined: Mon May 03, 2004 7:41 am

Remote Execution or Inject with semaphores? best practices.

Post by Azmodeus »

I have a function that I am running inside another process. And I'm wondering the best way to do it.

Here is what I have.

A dll/function that needs to read memory (ie players locations, etc.)

A exe that needs to display this info.

Only problem is that the function is CPU and HD intensive to execute. Therefore it shouldnt be stuck in a tight loop constantly updating.


Now, I've thought about injecting the dll and using a mutex/semphore to get reads done. And then have the exe/dll part wait on a mutex.

I've also thought about using a RemoteExecute version. Or even something like Hooking the window proc and catching SendMessage.

Any thoughts on the best practice/quickest way to handle this?

Ie from the time the exe wants the data, to reading data, to exe has data and can continue its work...

Also this is going to be called every few seconds.
madshi
Site Admin
Posts: 10527
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

It's hard for me to say. I'd say injecting a dll is easier. But I can't tell you which approach is the best. It very much depends on so many circumstances. You'll have to experiment to find out the best solution, I guess.
Post Reply