Link to home
Start Free TrialLog in
Avatar of eebruno
eebruno

asked on

SetThreadContext does not change EIP imediatly, only after a msg is received. Why?

Hello!

I'm using SetThreadContext to change the EIP of a thread of another process, then I use ResumeThread, But the thread only resumes after I do something for the thread (like... move the mouse around the window), this kind of things.

Why is this happening? How to imediatly resume the execution of the thread?

Thank you very mutch!
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eebruno
eebruno

ASKER

Thank you for replying, but.. Madshi,

I've tryed to use

PostThreadMessage( ThreadID, WM_NCACTIVATE, Integer( TRUE ), 0);

that I got from ELiCZ, but its not working too...

I do not use CreateRemoteThread coz it does not work under win9x... I am aware of the stability problem.

AlexFM: I only have the thread handle, not the window handle.. :-(
Avatar of eebruno

ASKER

I've splited because I've used the PostThreadMessage (like Mathias said) with WM_NULL as AlexFM said. Worked well, thank you