Stick with VB.Net or move on to C++

 

I have an addin I wrote using Jason's addin template/wizard.  I have some things I would like to modify in that addin.  I notice that Jason has an addin template using C++, but I don't know C++.  I've been playing around with it for a couple of days, but finding good resources for learning C++.Net has been difficult.  Should I just stick with VB, or try to learn C++.  Could anyone suggest any good books on learning C++.Net 2005 (or 2008)?

 

 

 

 

Posted by: Michael Frayser
Post date: 9/2/2008 9:34:46 AM

5 REPLIES

RE: Stick with VB.Net or move on to C++

 

Michael,

It's my opinion that if you're developing a commercial addin, C++ is the only way to go.  If you're just developing an addin for your company, take a look at http://www.jasonnewell.net/Downloads/tabid/63/forumid/13/postid/2045/view/topic/Default.aspx.  This is a mix of C++ and VB.NET\C#.  It is possible to develop using only .NET but I don't recommend it anymore.

 

Posted by: Jason Newell
Post date: 9/2/2008 12:25:41 PM

RE: Stick with VB.Net or move on to C++

Thanks Jason. I'll stick with what I know for now using your addin shim as a starting point.

 

Do you have any recommendations for a guy considering learning C++ (books, websites, etc)?

 

 

Posted by: Michael Frayser
Post date: 9/3/2008 10:52:25 AM

RE: Stick with VB.Net or move on to C++

 

Michael,

 

I made the move to c++ about a year or so ago. Before I started I had just finished reading .Net and COM by Adam Nathan. I pull out all stops and read it cover to cover and have to say it was the best start that I could get in understanding COM. I had done a bit with P/Invoke (mainly with the windows API for the ExplorerControls library) but this book just put all the pieces together so I actually knew why I was doing what I was doing...

If you go for the Shim approach this book will help no end.

I also recommend finding a relatively easy project to learn on (I used the file properties API as I had already written it in .Net and it was a lot simpler doing it directly in c++).

Once you've started to get the hang of the language I'd recommend C++ Common Knowledge by Stephen  Dewhurst (a nice concise collection of helpful information) and C++ Coding Standards by Herb Sutter and Andrei Alexandrescu (a good compact book to get you started on the right foot).

 

Other than that the internet is your friend . And if you can't figure something out just post here and see if someone is listening

As an alternative to the Shim approach you may want to try a C++/CLI addin. I posted a small example a while back. I found this approach an easy way to get used to c++ syntax while still using all the familiar .Net classes.

I have attached a pdf that I found a while back that has an overview of the c++/cli syntax (I always meant to take a look at the book but I don't have easy access to english books here...).

Cheers

Calum

 

Posted by: Calum McLellan
Post date: 9/3/2008 11:29:12 AM

RE: Stick with VB.Net or move on to C++

 

I thought I might have the Interop book, but I have COM and .NET Interoperability by Andrew Troelsen.  I think at the time, I was looking for the Nathan book, but couldn't get one.  Anyway, I didn't get very far into the book.  Jason published his addin template for VB, and I used that to create what I needed. 

I've looked at some C++ resources on the net, but it looks kind of confusing.  MFC, ATL, CLI ... where does one start?  I'm a design engineer who programs only when I (or someone else in the plant) needs a custom application, so I don't have an abundance of time to put into it, but I would love to learn C++ at my own pace. 

That being said, thanks for the resources you provided!

Mike

 

 

Posted by: Michael Frayser
Post date: 9/4/2008 2:28:21 AM

RE: Stick with VB.Net or move on to C++

Hi Mike,

 

MFC, ATL, CLI ... where does one start?

 

You'll need ATL, and of the other two I'd tend towards C++/CLI if only for the reason that you can use all the classes that you're used to not only for UI but also for data access etc.

 

Cheers

Calum.

 

Posted by: Calum McLellan
Post date: 9/4/2008 9:27:36 AM