Developer's Workshop to COM and ATL 3.0

Is this book still relevant considering it was published in 2000 and uses Visual C++ 6.0? I don't expect to fully learn COM but many api's use COM interfaces and I want to understand them better.
Yes, that is an excelent book. Troelsen is a good writer/coder. I did find one glaring mistake in the book though. I'll post it later. Funny thing about it, VC6 never picked it up; I discovered it when I comiled one of the example programs using Mingw.

COM is tough and hard to learn part way.
Sounds good. I was just afraid that things might've been removed or reworked in COM since the book was published. Now that I think about it if they changed COM like that then probably a lot of software would stop working. Interested to hear what that error is though.

Would you say that this is a good book to learn COM sufficient enough to use api's like Direct2D which use COM interfaces?
I'm guessing yes. I don't do anything special with graphics, so GDI is still good enough for me. But if Direct2D is based on COM, then I'd say your deductions are correct.

Believe it or not, I spent about five minutes looking for that error this morning, but failed to find it. I remember very, very well what it was though. It just goes to show that anybody can make mistakes, even famous authors.

What it was, Troelsen had created an object on the stack, i.e., something like this ...

class CSomeObject

int Foo(void)
  CSomeObject obj;

  // program code
  // ...
  // ...

 delete obj;

VC6 didn't crash on that for some reason, but Mingw did. When I looked at it, I saw he was calling delete on an auto object, which the compiler deletes automatically when it clears the stack after a function call.

About the first third of that book is a tutorial on COM basics, and is really good. The last two thirds are on ATL.
Topic archived. No new replies allowed.