المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Controlling an injected DLL



C# Programming
03-30-2009, 11:00 PM
Hi guys!
I wonder if anyone can help me figure out a thing because I think my head will explode soon if I keep head butting my keyboard http://www.barakasoft.com/script/Forums/Images/smiley_biggrin.gif
The problem is:
I inject from C# a DLL (coded in C) into a process.
The injected DLL hooks Winsock and give recv/send packets back to the controller (the C# program) through SendMessage/WM_COPYDATA.
So far so good, it works flawlessy.
Now I have the inverse problem. How can I give data back to the DLL?
For example the controller receive a specific packet from the DLL and tells it how to act. I dont want to add too much things to the DLL but keeping it pretty simple/small and make the controller do the hard work.

Hope I explained my problem enough http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif

Thank you all in advance.