[Mono-dev] Automatically generating a C wrapper library for a .NET assembly

Alan Broun abroun at alanbroun.net
Sat Dec 4 03:00:20 EST 2010


Hi there,

I have a need (or think I do) to call .NET code from a native C/C++ application. 

I think that I can do this by creating a C library that hosts the Mono runtime,
loads up the desired assembly and wraps the routines I want to call.

Ideally though I'd like to be able to generate this C library automatically
using reflection coupled with attributes to mark the routines I want to export.

My questions are

    - Is there an open source project out there that does this already? I've
done some Googling but can't seem to find anything.
    - If there isn't any open source code out there is that because it's a
rubbish approach? Can anyone think of any problems with the way I want to call
managed code?

Thanks in advance for your time.

Regards

Alan



More information about the Mono-devel-list mailing list