SendIpcMessage() returns FALSE on Win8 Metro IE.

c++ / delphi package - dll injection and api hooking
Post Reply
chaos072
Posts: 21
Joined: Wed Mar 20, 2013 2:22 am

SendIpcMessage() returns FALSE on Win8 Metro IE.

Post by chaos072 »

Hi..

I injected my hook dll into iexplore.exe (metro app) and hooked send() socket API.

And in hooked send() call, I called SendIpcMessage but the the function fails with return value of FALSE and the callback function is not called.

Interestingly, if I call SendIpcMessage() with dwAnswerBuf parameter set to "0", SendIpcMessage() works fine.

For example,

LPCSTR pIpc = "MadCodeHookIPC";
PVOID pMessageBuf = L"send()";
DWORD dwMessageLen = (wcslen((WCHAR *)pMessageBuf) + 1) * sizeof(WCHAR);
char answerBuf[10] = { 0 };
PVOID pAnswerBuf = answerBuf;
DWORD dwAnswerLen = sizeof(answerBuf);

SendIpcMessage(pIpc, pMessageBuf, dwMessageLen, pAnswerBuf, dwAnswerLen); // this call fails! And it fails with some delay(5~6 seconds).
SendIpcMessage(pIpc, pMessageBuf, dwMessageLen, NULL, 0); // this call succeeds but I can't receive any answer from another process.

For you information I'm testing madCodeHook 3.1.3 version on Windows 8 x64 environment. And in case of desktop iexplore.exe, IPC works fine.

Thank you.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendIpcMessage() returns FALSE on Win8 Metro IE.

Post by madshi »

Is it fixed in this build?

http://madshi.net/madCollectionBeta.exe (2.7.5.1)
chaos072
Posts: 21
Joined: Wed Mar 20, 2013 2:22 am

Re: SendIpcMessage() returns FALSE on Win8 Metro IE.

Post by chaos072 »

Thank you madshi.

It works perfectly.
Post Reply