IPC Issues in Windows XP

c++ / delphi package - dll injection and api hooking
Post Reply
peeps1980
Posts: 12
Joined: Thu May 03, 2007 7:18 pm

IPC Issues in Windows XP

Post by peeps1980 »

Hi madshi/onlookers,

We have a fully working IPC implementation running on Windows 7 (64-bit test system) but when running on an XP SP3 image we have stood up for backwards compatibility testing the IPC calls always return False.

Is this is known issue or could it be the VM perhaps? I know you have fixed an issue recently with Windows 8, just wondering if there is a similar problem?

Just to familiarize yourself with out implementation we have a DLL injecting in to processes which then call back to our main application. The implementation works perfect on Windows 7 so we know there are no problems there, it just fails on XP. The result of SendIpcMessage is always False and the resulting answerBuf remains unaltered (we default values in the Record before sending).

Any help would be greatly appreciated, thanks.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: IPC Issues in Windows XP

Post by madshi »

Are you calling InitializeMadCHook() before using the IPC functions? I know, it's a "stupid" question, but not calling InitializeMadCHook() has been known to cause such problems before, so it's better to double check, before checking anything else, just to be sure.

You can also try using "SetMadCHookOption(USE_NEW_IPC_LOGIC, NULL)" to force madCodeHook to use the vista/win7 IPC solution in XP, too.
peeps1980
Posts: 12
Joined: Thu May 03, 2007 7:18 pm

Re: IPC Issues in Windows XP

Post by peeps1980 »

Thanks for the quick reply madshi. Calling InitializeMadCHook didn't work but calling SetMadCHookOption as you suggested did work perfectly :D We are actually using the Delphi implementation of madCodeHook so calling InitializeMadCHook I didn't think was required, perhaps that just my misunderstanding, but at least SetMadCHookOption did work so thanks a million.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: IPC Issues in Windows XP

Post by madshi »

Yes, when using Delphi, InitializeMadCHook() is not required, it actually doesn't even exist in Delphi.
Post Reply