Click here to Skip to main content
15,611,246 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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&lt;IntPtr,List&lt;Objects&gt;&gt;</code>. Sometime it throughs exception such as <code>"cannot serialize Dictionary&lt;IntPtr,List&lt;Objects&gt;&gt;....."</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?
Note :
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...?
Updated 9-May-11 22:58pm

1 solution

You have to implement a directory class that implements the serialize method. And then after that add the data to your directory class.
Share this answer
glitteringsound 10-May-11 3:02am    
What do you mean by directory class? How can it be implemented?
glitteringsound 10-May-11 3:06am    
Ok I googled. This will create directories on my disk here. What it has to do with my problem? How creating the directory will actually solve my problem?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900