Board index » cppbuilder » Calling a c# dll from c++

Calling a c# dll from c++


2006-01-20 11:16:35 PM
cppbuilder36
Hi,
Is it possible to call a c# (.net) dll from a c++ program? I know you can
call an unmanaged c++ (or anything else) dll from c#.
Tim
 
 

Re:Calling a c# dll from c++

Quote
Is it possible to call a c# (.net) dll from a c++ program? I know you can
call an unmanaged c++ (or anything else) dll from c#.
Not directly, but if you create a mixed mode DLL in Visual C++, then you
can surely do that. Create a DLL project with pure C functions
(__declspec(dllexport) extern "C" __stdcall), which you can call from
native C++, and that function is able to call .NET methods. You have to
marshal every input argument from C++ to C to .NET, and every output
argument and the return value from .NET to C to C++.
Tom
 

Re:Calling a c# dll from c++

"Tim Frost" < XXXX@XXXXX.COM >wrote in message
Quote
Is it possible to call a c# (.net) dll from a c++ program?
Yes, if your unmanaged C++ project hosts an instance of the .NET CLR:
Hosting the Common Language Runtime
msdn2.microsoft.com/en-us/library/9x0wh2z3.aspx
Gambit
 

{smallsort}

Re:Calling a c# dll from c++

what about this??
www.csharphelp.com/archives3/archive500.html
or this
www.codeproject.com/dotnet/emilio_managed_unmanaged.asp
Joe Mele
www.youseful.com
www.fmplugin.net
"Tim Frost" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

Is it possible to call a c# (.net) dll from a c++ program? I know you can
call an unmanaged c++ (or anything else) dll from c#.

Tim