By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,852 Members | 1,014 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,852 IT Pros & Developers. It's quick & easy.

Data marshaling between unmanaged C++ & C#

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Check MSDN
Introduction articles:
http://msdn.microsoft.com/library/en...rp07152002.asp

http://msdn.microsoft.com/library/en...rp09192002.asp

Documentation
http://msdn.microsoft.com/library/en...anagedcode.asp

Interop Marshaling
http://msdn.microsoft.com/library/en...marshaling.asp

Marshaling Data with Platform Invoke
http://msdn.microsoft.com/library/en...forminvoke.asp
and visit this great site:
http://www.dotnetinterop.com/
and read this book (COM Interop)
http://www.amazon.com/exec/obidos/ASIN/067232170X/
For more, use newsgroup:
microsoft.public.dotnet.framework.interop


--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Nov 13 '05 #2

P: n/a
Great thanks!!!
--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/

Nov 13 '05 #3

P: n/a
Another question:
How can I deal with C# types in unmanaged code?

"Thomas Scheidegger [MVP]" <sp************@swissonline.ch> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...
Check MSDN
Introduction articles:
http://msdn.microsoft.com/library/en...rp07152002.asp
http://msdn.microsoft.com/library/en...rp09192002.asp
Documentation
http://msdn.microsoft.com/library/en...roperatingwith
unmanagedcode.asp
Interop Marshaling
http://msdn.microsoft.com/library/en...eropmarshaling.
asp
Marshaling Data with Platform Invoke
http://msdn.microsoft.com/library/en...halingdatawith
platforminvoke.asp

and visit this great site:
http://www.dotnetinterop.com/
and read this book (COM Interop)
http://www.amazon.com/exec/obidos/ASIN/067232170X/
For more, use newsgroup:
microsoft.public.dotnet.framework.interop


--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/

Nov 13 '05 #4

P: n/a
> 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...nentstocom.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...lcmainnode.asp

http://msdn.microsoft.com/library/en...MCOverview.asp

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


--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.