Calling C# DLL from C code

Hi,

I've seen plenty of examples of calling C++ or C code in dlls from C#.

I want to be able to call C# methods etc from C code in much the same way as C++ can be called from C.

Many thanks
Mike


Answer this question

Calling C# DLL from C code

  • StevenPo

    Alan,

    Many thanks for your reply. I never thought about turning the C# into a COM object so thanks for the pointer. I have downloaded the book and now the hard part starts :-)

    Cheers

    Mike


  • Vby

    Mike,
         the only way I believe you could do it would be to wrap your C# code into a C# COM object. Then your client can access the component as you would a regular COM object. You can go to http://www.apress.com/free/ and download the free book "COM and .NET Interoperability". It goes over going form C# to C++ and vice versa.

    Regards
    Alan

  • Calling C# DLL from C code