Support Statement: What is an easy COM replacement?

Support Statement: What is an easy COM replacement?

COM replacement with .NET assemblies is relatively easy if the two APIs are similar, i.e., they have similar classes and members -- at least in the areas used by your application. 

Some examples of simple COM API replacements are:

  • Windows Common Controls ProgressBar with WinForms ProgressBar

  • MSXML2 with System.XML

Here, "similar" means the number of objects and arguments involved in setting up and making calls is the same and the exceptions raised by the calls are conceptually the same.  Basically, if the code to instantiate objects and make calls to the API can be updated "in place" without having to restructure the code, then it is a close match.  If additional objects/state must be declared and instantiated or if code has to be restructured, then it is not a close match.  

Note that most API upgrades are a mix -- mostly close, but a few things are gone, or very different.  The introduction of a little run time support can help in these cases.

Automatic Support (aka Stub) Framework Generation

By default, gmStudio “replaces” COM APIs and controls with a generated .NET support framework. This framework is a collection of enums and stub classes that expose the members (properties, fields, methods, and events) required for the translation. The stubbing feature is a very robust and advanced capability that can even be used to generate a custom support framework that reflects migration plans. More information on the gmStudio stub generation capability is present in https://greatmigrations.atlassian.net/wiki/spaces/GMG/pages/1585100