.netcomumdf

Is it worth to learn COM?


I am thinking to learn COM.But I heard that Microsoft launched .NET as an alternative to COM. So is it worth to learn COM? actually I started learning COM for UMDF device driver. Is there any alternate way to work on UMDF except COM?


Solution

  • UMDF is a framework to develop user mode device drivers. I think a key requirement for a device driver is: load fast. I don't want to delay my startup times just because I have a funky device driver that has to load and JIT the .NET framework (preJITed but nonetheless).

    Sure you can develop bloated com libraries too but by being competent you can avoid it. You can't avoid .NET runtime.

    So even if UMDF allowed for .NET development I at this point of time wouldn't want device drivers written in .NET.

    Don't get me wrong. I love .NET. I just don't think it mixes that well with device drivers even if we are talking about usermode drivers.

    When looking at COM I think it helps to understand why it was developed: to provide interopability between components developed in different environments. This was back in the '80s. Now people has complained about COM over the years but it is actually very successful at that. There were some mistakes in the deployment model of COM (ie the registry dependency) and other interesting design choices that have made developers scratch their heads. However, the core of COM (ie IUnknown) is still sound IMO.