Newbie Question about C# Dll's

G

Guest

I'm very new to C#. I've been using VC++ for a number of years. I want to
create a dll in C# .Net and use a few functions in it in an MFC based VC++
app.

Can someone give me pointers, either towards some easy tutorials, or if the
instructions are simple enough go ahead and just respons with them.

Thanks in advance,
ed
 
B

Bob Powell [MVP]

..NET DLL's are much simpler to create than MFC DLL's. Creating them is no
problem at-all. Assuming you have Visual Studio 2003 you can just create a
C# class library and start writing code.

The problems will come when you want to integrate this with your VC++ app.
It is possible using COM interop, your C# DLL will need to expose interfaces
and be registered with your system using regasm.exe. From the VC++ side
though you'll have all the joys of using COM to contend with. In addition a
..NET DLL will require the framework to be installed on any target machine.

If you're creating the app from scratch and just using MFC because it's the
simplest solution for you you may find it easier just to go with a C#
managed app from the get-go.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

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

Top