Windows 7 64 bit IPC not working properly

c++ / delphi package - dll injection and api hooking
Post Reply
JacobS1
Posts: 4
Joined: Fri Sep 03, 2010 9:46 am

Windows 7 64 bit IPC not working properly

Post by JacobS1 »

Hello,
I am using madcodehook 3.1 and on windows 7 32 bit every thing worked great, but when I tested on windows 64bit, I started having some issues.
I am using the madcodehook IPC api, my injecting process is a .net service that also starts an IPC server, but in windows 7 x64 the ipc clients cant connect to the server. the SendIpcMessage call returns false ( no error in GetLastError ).
The CreateIpcQueue call returns successfully.
I have tried testing the IPC without any injected dlls, only a simple C++ console that tries to connect to the server and it failed.
Another strange behavior is that if I create a C++ console app and try to start an IPC queue and SendIpcMessage , if compiled to x64 target ( with the madCHook64 lib ) it works and if I try the x86 target ( with the madCHook32 lib ) it fails and the error code is 87.

Any ides what am I doing wrong ?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Windows 7 64 bit IPC not working properly

Post by madshi »

Have you called InitializeMadCHook() before using the IPC functions?
JacobS1
Posts: 4
Joined: Fri Sep 03, 2010 9:46 am

Re: Windows 7 64 bit IPC not working properly

Post by JacobS1 »

thanks, that solved the problem.
As usual, a quick and excellent reply :D
( would be a good idea to mention that InitializeMadCHook is needed before the IPC queue creation in the API documentation and in the header )
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Windows 7 64 bit IPC not working properly

Post by madshi »

I should really add a check for InitializeMadCHook() in all exported functions and complain if it wasn't called. Had that in mind for quite a while, but not the time to actually implement it yet.
Post Reply