views:

270

answers:

7

I just started a new job that involves lots of COM programming. I'm doing ok so far, by going on my COM fundamentals that I've picked up along my journey as a dev, but I'm the kind of guy that needs to know everything. And working with COM all day irks me since I don't know how this stuff works.

Is there a simple walk through to creating a basic COM object from scratch? I mean everything. No Visual Studio, no ATL. Just the compiler, and notepad.

+8  A: 

You should read this article from CodeProject:

spoulson
Plain C++ is much easier IMOHO. I don't think the OP is THAT much of a gluten for punishment!
Aardvark
For all we know, he could be... the article shows the inside mechanics in brutal detail.
spoulson
Does a gluten for punishment only bother people with wheat allergies? (Ahem. The word is "glutton.")
Rob Kennedy
OP here - this series of articles looks to be exactly what I'm looking for!
Anybody using nothing but notepad for development is a glutton for punishment.Heck, notepad doesn't even preserve file encodings properly!
Arafangion
+6  A: 

If you can get a hold on a copy of Inside COM, it should make you happy.

Serge - appTranslator
This book uses straight C++, no ATL or MFC. Highly HIGHLY recommended. +1. I'm not sure what not using Visual Studio would buy you other than a lesson on cl/link/midl's command lines. I don't think you'll get much (COM specific understanding) out of that.
Aardvark
Inside COM is, without a doubt, the BEST book to get to learn the basics of what COM really is. You'll need to read others - Essential COM and Inside OLE2, for example, to really get all the gory details, but you won't be able to learn COM from those books. Inside COM is the place to start. Then go buy ATL Internals 2nd Edition to see how to make coding COM in C++ somewhat tolerable. :-)
Chris Tavares
+2  A: 

I also recommend you to read Essential COM by Don Box after getting basic concepts of COM from Dale Rogerson's Inside COM.

Vinay
+1  A: 

If you can stand it, I would suggest Inside OLE2. It's a big, long tedious book that goes into quite a bit of detail of how COM works. I wound up reading this book several times, each time gaining a little deeper understanding.

Ferruccio
+1  A: 

Another book to consider is Effective COM. It's not a beginners book but really really good.

FuleSnabel
+1  A: 

I found Apple's mDNSResponder implementation a helpful sample.

StackedCrooked