473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to expose MC++ code to C#

What does it take to expose MC++ functions to C#? (Component/Assembly/?/?)
I just ordered books on the topic at Amazon but just I can't wait getting
started. I would be very happy to get some clues for further searching.

Thanks a lot!, Teis
Nov 16 '05 #1
2 1172
Managed C++ code compiled with the /clr switch can be automatically be
called by C# as it is compiled to IL. If you have a piece of unmanaged C++
that you wish to expose you must write a managed wrapper to have it callable
from C#. Here are three of my O'Reilly articles to get you started:

http://www.ondotnet.com/pub/a/dotnet...intromcpp.html
http://www.ondotnet.com/pub/a/dotnet...03/mcppp2.html
http://www.ondotnet.com/pub/a/dotnet...cpp_part3.html
--
----------------------------------
Sam Gentile
MVP - C#/.NET
INETA Speaker http://www.ineta.org/DesktopDefault.aspx
Read my blog at http://samgentile.com/blog/
------------------------------------------------------
"Teis Draiby" <te*************@draiby.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
What does it take to expose MC++ functions to C#? (Component/Assembly/?/?)
I just ordered books on the topic at Amazon but just I can't wait getting
started. I would be very happy to get some clues for further searching.

Thanks a lot!, Teis

Nov 16 '05 #2
Nice. I'll include your name in my future Google searches on whatever topic.

Regards, Teis
"Sam Gentile [MVP - C#/.NET]" <no****@nomail.com> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
Managed C++ code compiled with the /clr switch can be automatically be
called by C# as it is compiled to IL. If you have a piece of unmanaged C++
that you wish to expose you must write a managed wrapper to have it callable from C#. Here are three of my O'Reilly articles to get you started:

http://www.ondotnet.com/pub/a/dotnet...intromcpp.html
http://www.ondotnet.com/pub/a/dotnet...03/mcppp2.html
http://www.ondotnet.com/pub/a/dotnet...cpp_part3.html
--
----------------------------------
Sam Gentile
MVP - C#/.NET
INETA Speaker http://www.ineta.org/DesktopDefault.aspx
Read my blog at http://samgentile.com/blog/
------------------------------------------------------
"Teis Draiby" <te*************@draiby.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
What does it take to expose MC++ functions to C#? (Component/Assembly/?/?) I just ordered books on the topic at Amazon but just I can't wait getting started. I would be very happy to get some clues for further searching.

Thanks a lot!, Teis


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Daniel Lidström | last post by:
Hi, I've been trying a long time now to generate some XML using MC++ and XmlSerializer. I have a piece of C# code that produces exactly what I want, but I simply can't get the MC++ code to write...
3
by: Philip | last post by:
I am invoking a mc++ method from C# via an unsafe code block. The reason for the unsafe code block is that I am receiving a int as a return parameter. I am invoking the method with a "ref...
8
by: Ted Miller | last post by:
Hi folks, I'm looking at moving a large base of C++ code to .Net under tight time constraints. The code runs in mission-critical environments, and I am extremely concerned about the loader lock...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
2
by: Lev | last post by:
Hi, I have some code that does reflection on an assembly I load. When I try to get the attributes on one of the methods implemented in the assembly, the MC++ version does not return anything....
0
by: Peter Insley via .NET 247 | last post by:
Hi, have been searching for an answer for this for quite a while,I would be greatfull for any help. We are developing a codebase that of components that we wouldlike to be able to write in MC++ or...
0
by: Maxwell | last post by:
Hello, I recently completed a MC++ (VS2003) DLL that wraps a non MFC C++ DLL and need to use it in a MC++ Console Application (no forms/guis of any kind just output to console). Trouble is...
14
by: Jamey Shuemaker | last post by:
Greetings all, I've been reading for the last couple hours posts on this site and various MS sites about reference libraries and class modules. System: Windows 2K running an A2K db with...
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.