CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: .dll in c#?

  1. #1
    Join Date
    Mar 2009
    Posts
    27

    .dll in c#?

    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;

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: .dll in c#?

    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.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  3. #3
    Join Date
    Apr 2006
    Posts
    220

    Re: .dll in c#?

    What is injectable dll

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured