Click to See Complete Forum and Search --> : .dll in c#?


boever
March 24th, 2009, 02:05 PM
Hi all,

I want to hook WSASend from a certain application. I want to do this with c#.
All information i got, points me to injecting a .dll into the process and hook the WSASend function.

I was wondering if it was possible to write an injectable .dll with c#?
And how can i call the functions from this .dll within my c# app?

Someth like this ?
[DllImport("MyDll")] public static extern MyWSASend( WSASend param ) ;

public static MyWSASend( .. ) {

decode data from packet;
show decoded data to window;
do the actual WSASend;
}


Any help is GREATLY appreciated;

darwen
March 24th, 2009, 04:22 PM
I was wondering if it was possible to write an injectable .dll with c#?


To my knowledge, no it's not. In fact I'm sure I've read somewhere on MSDN that it's not possible : which I'm not surprised about since it exports no symbols.

You'll have to write the dll in native C++.

Darwen.

nabeelisnabeel
March 26th, 2009, 02:42 AM
What is injectable dll