Page 1 of 1

Remote Execution or Inject with semaphores? best practices.

PostPosted: Mon Dec 12, 2005 11:29 pm
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.

PostPosted: Tue Dec 13, 2005 7:51 am
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.