--- In [email protected], "swzoh" <sean...@...> wrote:
>
> --- In [email protected], "entropyreduction" 
> <alancampbelllists+yahoo@> wrote:
> >
> > So what then?  I'm on the one and only Powerpro thread, sleeping probably 
> > won;t help much.  
> >
> 
> I don't think there is other choice except polling periodically:
> While (InSendMessageEx(NULL)&(ISMEX_REPLIED|ISMEX_SEND) == ISMEX_SEND)
>        Sleep(10)

Does that allow the thread to finish processing the message?  Maybe you need to 
use replymessage(0) and hope for the best?

>
> 
> Hook itself isn't a problem. The trouble in this regard is that PP and 
> ppro.dll seem to use also SendMessage to communicate with each other, 
> possibly WM_COPYDATA.
>

It only uses sendmessage if a defined hotkey or mouse action is triggered.  The 
sendmessage is to ask if the target field is matched before the dll commits to 
eat the mouse action/key and activate the hot key.  All of the caption match 
stuff for target is in the main exe and cannot run in a hook dll.  This happens 
even if target is empty -- I guess I could have passed the fact that the target 
is empty to the dll to allow it to avoid sendmessage in this case, but that 
optimization did not seem needed.



Otherwise, postmessage is used by dll to communicate with PowerPro, I believe.

I would have thought that a more likely reason for sendmessage would be some 
kind of window proc processing, either for a bar or a dialog. 



Reply via email to