Calling C# dll From C++ app.

  • Thread starter Thread starter Roth Fouty
  • Start date Start date
R

Roth Fouty

I want to write a C# dll and then call if from an
existing C++ app. I haven't been able to find anything
on the net regarding this so I was wondering if anyone
out there has tried this and if it's even possible. Any
direction would be greatly appreciated.
 
Hi Roth,

it is possible through a com callable wrapper I ve done
it a couple of weeks ago. C# class library then appears
as a com object. Will check if I can provide the source.

Peter
 
Hi Roth,

As I understand, you want to call C# dll from within an unmanaged C++
application. Please correct me if there is any misunderstanding. Peter is
correct that you can use COM Interop to do so, please refer to the
following MSDN documentation and sample:

Exposing .NET Framework Components to COM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconexposingnetframeworkcomponentstocom.asp?frame=true

COM Interop Sample: COM Client and .NET Server
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconexposingnetframeworkcomponentstocom.asp?frame=true

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top