I am facing a strange problem while serializing the data from hooked process for injector (which injected the spy dll into some other process). I am successfully landing spy dll into other managed process. But when there I want to serialize custom objects from that spyDll (which actually landed inside other managed process which was hooked) , here problem occurs. Here I want to serialize the data and Lists or .NET dictionaries e.g say <code>Dictionary<IntPtr,List<Objects>></code>. Sometime it throughs exception such as <code>"cannot serialize Dictionary<IntPtr,List<Objects>>....."</code>, some time it says that mark all classes and types inside hooked process as serializeable. I also tried Json to do that but I failed somehow to use it properly.
Can any body having experience to get the data from spy dll to injector Successfully, which then can be transmitted to the module which is using injector to get some data from remote processes via hooking and injection then after.Serialization works perfectly fine in simple console bases applications, but the way I want to get the data is totally different , as there's one MessageHookProc function , which is responsible to load managed assembly into other managed process.
Any body who is expert in injection and hooking for .NET processes and used some information of hooked processes successfully?
Suggestion required for for dispatching data from hooked process towards hooking process(the process which hooked the other processes with the help of injector and spy dll) via .NET remoting as inter process communication? If some how there's no solution for serialization of the data from hooked process towards hooking process...?