Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In prior releases, the deep migration work in the samples was partially done by DLLs developed using our C-based API (gmNI).  gmNI is not available for typical gmStudio users, and we wanted to rework the samples using our scripting language, gmSL. In addition, prior releases of the samples used custom COM Interface Description Files (IDFs). The custom IDFs are a convenient way to map a COM API to its .NET replacement, but they have some disadvantages from a tooling and maintainability perspective. In this release, we are going to use Refactor files to specify mapping COM APIs to their .NET replacement. In some cases, the mappings also include instructions to load gmSL scripts that perform deep migration.  The gmSL scripts that are distributed as text files with the tool and the samples and they may be extended and altered by users to meet their specific upgrade needs.  Note: the COM upgrade techniques demonstrated in the samples are general capabilities that may be applied to any COM API.  See  Additional examples of COM upgrade rules are published on the gmStudio Extensions page. 

Info

Deep Migration: An upgrade requiring advanced transformations such as adding or removing logic and choosing from different replacement types and coding patterns. Deep migration goes beyond the surface migrations and alterations which can be specified with refactoring attributes on various COM API elements in an IDF.

Warning

The gmNI DLLs, ScrrunMigration.dll and MscomctlMigration.dll, are no longer distributed with gmStudio. Please apply the new approach using gmSL scripts as illustrated in the latest samples. Contact Great Migrations if you require assistance.


ScanTool Sample Changes

The ScanTool sample includes several COM API replacements. One of these, Scrrun to System.IO, requires a number of deep migrations:

...

In prior releases of the sample, the Scripting to System.IO migration was done using a custom IDF and an associated gmNI DLL: GM.scrrun.dll.xml and ScrrunMigration.dll. These migration assets were activated using the following commands in the translation script:

Code Block
languagexml
<Registry type="libname" source="scrrun.dll" target="GM.scrrun.dll" />
<Registry type="idfstatus" source="GM.scrrun.dll" target="migrate" />

...

Code Block
<Refactor id="[GM.scrrun.dll]" dllName="ScrrunMigration.dll" event="scrrun" >

Starting with the DEcDec-2019 TeleaseRelease, we are doing the Scripting to System.IO migration with a COM Refactor IDF file and an associated gmSL script: Refactor.Scrrun.dll.xml and Transform.Scrrun.gmsl. These migration assets are activated using the following command in the translation script:

...

  • Scrrun.Refactor.xml: COM API elements adjustments for scrrun.dll to System.IO and Specialized Collections.OrderedDictionary
  • Scrrun.Transform.xml: Scrrun.Transform Class implementing transformations for various scrrun.dll API references
  • Mscomctl.Refactor.xml: COM API mapping for Windows Common Controls to WinForms Controls
  • Mscomctl.ServiceMethods.gmsl: MScomCtl.ServiceMethods class implementing service extensions that alter the processing done by the core tool at specific points in the upgrade process
  • Mscomctl.MigCode.gmsl: MScomCtl.MigCode class implementing dynamic code generation logic for MScomctl API controls
  • Mscomctl.Transform.gmsl: MScomCtl.Transform class implementing transformations for various Mscomctl API references

 Additional examples of these files and other COM upgrade rules are published on the gmStudio Extensions page. 

Other Samples

These changes also impact the FileExplorer, FMStocks, and WPFScanTool samples.