Data marshaling between unmanaged C++ & C#

V

Vadym Stetsyak

Hi there!!!

I'm looking for any resources on the subject.
Any help will be appreciated!

--
Vadym Stetsyak
ICQ 161730125

He, who commands the past - commands the future
He, who commands the present - commands the past
 
T

Thomas Scheidegger [MVP]

How can I deal with C# types in unmanaged code?

This is only possible with COM-Interop.
Thus you have to design your C# class to be COM compliant,
then register it as a COM component with the REGASM tool:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp

Sure, the unmanaged/C++ side has to use the COM API / interfaces
(like CoCreateInstance) to access this COM component.


Note, there is 'Managed C++' where you can mix
managed and unmanaged C++ code:
http://msdn.microsoft.com/library/en-us/vcedit/html/vcorivisualcmainnode.asp

http://msdn.microsoft.com/library/en-us/vcmex/html/vcconMCOverview.asp

Thus you could use 'Managed C++' as a bridge between
unmanaged C++ code and C#.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top