Hook interrupting DDE

c++ / delphi package - dll injection and api hooking
Post Reply
choochy2003
Posts: 88
Joined: Fri Mar 21, 2008 4:52 am
Location: Adelaide, South Australia
Contact:

Hook interrupting DDE

Post by choochy2003 »

Ever since we started testing our hooking on Windows 8 we are seeing an issue with MS Excel 2013 where by Excel process starts, hangs and displays the message "There was a problem while sending the command line to the program" and does not terminate unless manual terminated via Task Manager. From what I can tell so far this is due to Excel not being able to read (or blocking) the DDE message sent between Explorer and Excel for the file requested to be opened. As soon as the Hook is stopped the issue goes away. It seem intermittent to get the issue to happen but once it happens it seems to follow on more occasionally.

We are running a simple Print Monitoring Hook that to the best of my knowledge shouldn't interfere with the DDE stuff.

I just thought that before I start a full analysis on the issue if anyone had heard of or had any similar issues? Also any pointers regarding how best to debug this.

I have used all the latest madCodeHook releases even the latest beta.

Thanks!
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Hook interrupting DDE

Post by madshi »

I've heard of problems like this when people are using SendIpcMessage() with the "handleMessages" parameter set to "true". This is sometimes necessary, but it can also result in problems. Unless you absolutely have to set "handleMessages" to "true", I'd recommend setting it to "false". Maybe that will already fix the issue?
choochy2003
Posts: 88
Joined: Fri Mar 21, 2008 4:52 am
Location: Adelaide, South Australia
Contact:

Re: Hook interrupting DDE

Post by choochy2003 »

I don't think our Hook DLLs send any IPC Messages during their initialisation. I am hoping it is as simple as changing the handleMessages parameter but I have a feeling its not.

Strange thing is that the DLL compiled with a much older version of madCodeHook (maybe 6 months older) causes the issue to always happen, where when coupled with the latest madCodeHook its intermittent, but that may perhaps just be a matter of a timing difference.

I am waiting for the customer to give me a P2V image of one of their affected workstations that I can play with.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Hook interrupting DDE

Post by madshi »

I'm not talking about initialization, I'm talking about SendIpcMessage() calls in your hook callback functions. If that's not the problem then I don't know what is. You could try with a "empty" (just calling the original API untouched) hook callback functions to see if your own hook callback function code is somehow responsible for the problem or not.
Post Reply