tags:

views:

124

answers:

4

Hi,

From a person wanting to know more about Windows Internals, reading the book "Windows Internals", and wanting to get into driver development, is learning COM programming a good idea?

How deep should I get into it? Just understand the basics or should understanding be advanced, taking into account the above.

+2  A: 

COM isn't used much in current development, but there is an enormous amount of software still using it. Just understanding the basics should be sufficient.

Joel
"COM isn't used much in current development" .. really? I work primarily in .net, but spend a *lot* of time interfacing with COM-based components!
Rob
Interfacing to legacy software, yes -- which is why I said he should learn the basics. Creating new COM components, not so much.
Joel
If you get a job offer where you will be developing COM, run as fast as you can in the opposite direction.
Keith Rousseau
-1, this answer in no way addresses the original question. Kevin's answer does.
Hans Passant
@Joel, What I should have added in my comment is that the COM-based components I interface with are under *active development*
Rob
+4  A: 

Windows device drivers have nothing to do with COM. You can safely be ignorant of it.

Kevin Panko
note entirely true. there is a form of COM used by the multimedia driver stack.
John Knoeller
+1 for being the truth, but there is a surprising number of lower-level APIs which the poster could come across which use a "COM-like" interface. I ran into this with the VSS API, which has a separate implementation of IUnknown. Knowing COM allowed me to understand the API more quickly.
codekaizen
+3  A: 

COM doesn't have a lot of value for kernel mode driver development either, but it's potentially useful for user mode drivers. DirectShow is COM, for instance, and there's even a light-weight COM analog used in kernel mode DShow filters.

There's a lot of code out there that is COM, and legacy code takes years or decades to disappear. But more importantly IMO is the fact that a .NET assembly looks like COM objects when used from C/C++, so I think there's still some value in knowing COM if you intend to keep writing C/C++ code.

If you plan to switch to C#, Java, or one of the dozens of other languages-without-pointers that (judging from the questions here a SO) the majority of programmers have adopted, then no, not worth the opportunity cost.

John Knoeller
If you're judging from the majority of questions, you should write `majority of ignorant programmers have adopted`.
SLaks
When you insult people here, they tend to react by downvoting your answers, so I'll pass. :D
John Knoeller
A: 

On the one hand, COM seems to be Microsoft's preferred method of interoperating between native and managed (.Net) code. And to be honest, .Net does handle COM well.

On the other hand, in the immortal words of Lino Tadros:

COM is like SMOKING: If you have not started, you should not start now, if you are already doing it, it is time to stop.

Personally, I use it when I need to talk to existing COM objects (like MSXML), or if I absolutely needed to talk to a .Net assembly from native code where something like unmanaged exports isn't an option, but don't consider it useful for new development.

Bruce McGee