Skip to content

Blog

New Reports: Unused Symbols and Late Calls

Large mature systems often contain symbols that are no longer used. These may be methods that are no longer called or variables and data structures that are no longer referenced by active logic. These unused symbols are often referred to as “dead code, dead wood, Cruft”. Dead code make a system “smell bad” and a form of technical debt, and it can be difficult to identify and risky to remove. An Upgrade Project is an optimal time to deal with dead code because gmStudio can help you identify and remove it.

Learn how in this Support Statement: Unused Symbol Analysis and Reporting

gmStudio Release News: Monday, 10-October-2022

gmBasic is a code transformation engine that reads, interprets, and rewrites VB6/ASP/COM systems to one of the .NET languages (C# or VB.NET). Based on feedback from our clients and migration projects in the field, we are continuously improving gmBasic so as to help developers more easily produce cleaner and more correct upgrade results. Most recently, this work includes general improvements needed to produce build-complete C# code for a Retail ERP system having 1.2M LOC organized into 73 inter-related VBPs, and to produce build-complete VB.NET code for a Construction Project Management System having 800K LOC organized into 31 inter-related VBPs. The release also includesa sophisticated new utility, gmGlobal, that can automate the process of identifying dead code. This major distribution, Version 40.34, includes many enhancements; for example:

  • Improves inference of array rank when a undimensioned variant is used as an array
  • Improves migration of Object inferred as Form used with For Each
  • Improves migration of the VB6 intrinsic Input function to a Generic method
  • Improves overall correctness of results when using the Shared Files consolidation capability
  • Improves overall correctness of results when using the Optional Arguments capability
  • Improves declaration of stub controls that override Name property
  • Improves the Global Stub framework for systems that use Implements commands
  • Improves assembly references added for GlobalStubs translations
  • Improves avoiding a name clash between external class name and module field
  • Improves ability to recognize methods called like properties
  • Improves stub framework generation to allow implementing multiple interfaces (VB.NET)
  • Improves stubbing Readonly properties (VB.NET)
  • Improves handling of date literal assigned to const (VB.NET)
  • Improves handling of operations that involve a late-bound implicit default property
  • Improves the behavior of Refactor/Remove
  • Improves migration of array properties
  • Improves handling name clash between method and one of its parameters
  • Improves vbCrLf used as an optional parameter default (VB.NET)
  • Improves translation of late bound reference to a collection item
  • Improves handling of codes declaring symbols that clash with VB.NET reserved words
  • Improves handling migration of GoSub in methods declaring optional parameters
  • Improves logic to detect implicit conversions that must be made explicit (VB.NET)
  • Improves logic to make default property reference explicit for a Select Case (VB.NET)
  • Improves detecting and reporting undeclared identifiers
  • Improves initializing const symbols using an enum entry
  • Improves reference tracking to allow for Unused symbol analysis
  • Improves csproj and vbproj content to follow current Visual Studio conventions
  • Improves processing more HTML5 tags in ASP translations

gmStudio: Upgrade Solution Development Environment

Section titled “gmStudio: Upgrade Solution Development Environment”

Powered by gmBasic, gmStudio is a platform for analyzing code and developing custom VB6/ASP/COM to .NET upgrade solutions. We are continuously adding functionality to gmStudio and making it easier to use. This distribution includes several enhancements:

  • Changes Trial License limits; increases duration to 30 days; lowers LOC limits: VB6=5,000 LOC, ASP=2,500 LOC
  • Adds Source Member to .NET Build Log Report and Target Code Scan Report for VB.NET translation tasks
  • Adds Translation Audit as a new type of report
  • Improves IDL generator to allow reporting hidden coclasses
  • Improves Target Code Scan to report TaskTag rather than File extension in the LocType field
  • Improves Ctrl-C handling to follow control having focus
  • Improves Task-list Hot-Key handling
  • Adds Alt-G as hotkey to Generate and Open VS Solution file
  • Improves All IDF Scan to search all IDF folders
  • Corrects issue where malformed XML attributes in ScriptRules file caused gmStudio to hang or crash

gmAPI: a .NET API for Developing Advanced Upgrade Solutions

Section titled “gmAPI: a .NET API for Developing Advanced Upgrade Solutions”

Powered by gmBasic, gmAPI is a .NET API for automating our upgrade engine and accessing the semantic models produced by our unique linguistic compilation technology. gmAPI also includes classes for managing complex upgrade rules and integrating with gmStudio. This API was updated to reflect the latest improvements and conventions in the gmBasic platform.

gmMetrics: Advanced Metrics Reporting tool

Section titled “gmMetrics: Advanced Metrics Reporting tool”

gmMetrics is a tool for reporting the content of system models generated by gmBasic. This includes Symbol Tables, References Reports, Definitions Reports, and Model Audits. gmMetrics is a console application written in C# using gmAPI. We maintain and enhance gmMetrics to keep it in sync with the model schema and to produce new reports.

  • Adds more detailed symbol usage data to Semantic Audit Reports
  • Improves accuracy of References Report
  • Improves accuracy of Definitions Report

gmStudio ships with a collection of sample upgrade rules that can be used to add custom features to your upgrade solution. These XML documents and gmSL scripts are distributed as source that you may modify to fit your unique requirements. The sample rules were updated to reflect the latest product improvements and conventions. See also additions and changes in gmStudio Extensions Repository.

  • Improves Environment.std.xml with additional StubBaseClass entries
  • Adds sample gmGlobalIncludes.gmsl and gmGlobalIncludes.xml to Global Includes analysis
  • Adds MSCAL.ocx.WinForms.Refactor.xml
  • Adds MSWORD.OLB.Interop.Refactor.xml

gmRTL is a sample runtime library that contains classes allowing for more readable translations. Learn more about gmRTL here.

  • Adds gmRTL.GUI.PictureBoxExtended control to support drawing graphics on a PictureBox

Great Migrations publishes a number of sample VB6/ASP upgrade solutions to illustrate the capabilities of gmStudio. The sample upgrade solutions and results were updated to reflect the latest product improvements and conventions. Learn about the samples here.

gmStudio Release News: Tuesday, 05-July-2022

gmBasic is a code transformation engine that reads, interprets, and rewrites VB6/ASP/COM systems to one of the .NET languages (C# or VB.NET). Based on feedback from our clients and migration projects in the field, we are continuously improving gmBasic so as to help users more easily produce cleaner and more correct results. Most recently, this work includes general improvements needed to produce build-complete C# and VB.NET code based for several enterprise systems containing over 2M LOC organized into dozens of inter-related VBPs. This major distribution, Version 40.30, includes several enhancements:

  • Adds support for specifying a base class for controls in the stub framework
  • Improves the quality of translations for systems of many inter-related VBPs
  • Improves handling numeric const values declared with type indicator character
  • Improves expression of VB File IO Operations: LOF, Seek, FileCopy
  • Improves handling of parameters declared As Any
  • Improves handling of name clashes between global symbols
  • Improves handling of PictureBox.Image.Set
  • Improves type inference for variants used as arrays
  • Improves inferring the number of dimensions for array parameters
  • Improves handling undeclared variables when archaic typing directives (e.g. DefInt) are in use
  • Improves handling Select-Case with byte compared to enum entry
  • Improves translation for integer division for VB.NET
  • Improves conversion of string to double for VB.NET
  • Improves GoSub migration to support references to local const variables
  • Improves GoSub migration when subroutines are refactored out of functions for VB.NET
  • Improves handling of comments in ASP translations
  • Improves migrating parameterized properties
  • Improves migrating enumerations in COM libraries
  • Improves migrating methods with optional arguments
  • Improves migrating Select Case Is… with Date variables
  • Improves migrating VB.Line geometry from Twips to pixels in designer code
  • Improves handling of interfaces when generating translation for a system of inter-related VBPs
  • Improves handling of custom events and event handlers when generating translation for a system of inter-related VBPs
  • Improved migration of On Error handling to try-catch

gmStudio: Upgrade Solution Development Environment

Section titled “gmStudio: Upgrade Solution Development Environment”

Powered by gmBasic, gmStudio is a platform for analyzing code and developing custom VB6/ASP/COM to .NET upgrade solutions. We are continuously adding functionality to gmStudio and making it easier to use. This distribution includes several enhancements:

  • Adds Reset Filter item to Toolbar Filter button
  • Adds Line Pragma (%LN%) to ScriptRule pre-processor and editor integration
  • Adds option to create a starter for a hand-coded IDF (e.g. for when IDF cannot be generated from COM)
  • Improves handling of Task List context menu hotkeys when task list does not have focus
  • Improves handling of Task Filtering hotkeys
  • Improves conventions for using custom tools with gmStudio project tasks
  • Improves logic for merging ScriptRule elements into the translation script in the order they are defined in the ScriptRules file
  • Improves user folder scan by suppressing matches in CodeScanList.txt
  • Improves Source Metrics Report to include DSX report data
  • Improves Side-by-Side Viewer to include DSX report data
  • Improves IDF generator to handle typedefs for auto properties in IDL for interop assemblies
  • Improves Title of the Side-by-Side Viewer panels
  • Improves Information Panel grid data cache/refresh behavior
  • Improves Side-by-Side viewer for use with VBScript classes
  • Improves .NET Build Log reporting performance and editor integration

gmAPI: a .NET API for Developing Advanced Upgrade Solutions

Section titled “gmAPI: a .NET API for Developing Advanced Upgrade Solutions”

Powered by gmBasic, gmAPI is a .NET API for automating our upgrade engine and accessing the semantic models produced by our unique linguistic compilation technology. gmAPI also includes classes for managing complex upgrade rules and integrating with gmStudio. This API was updated to reflect the latest improvements and conventions in the gmBasic platform.

gmMetrics: Advanced Metrics Reporting tool

Section titled “gmMetrics: Advanced Metrics Reporting tool”

gmMetrics is a tool for reporting the content of system models generated by gmBasic. This includes Symbol Tables, References Reports, Definitions Reports, and Model Audits. gmMetrics is a console application written in C# using gmAPI. We maintain and enhance gmMetrics to keep it in sync with the model schema and to produce new reports.

  • Adds option to generate System Metalanguage Information File Audit
  • Improves the quality of reference location reporting for ASP systems

gmStudio ships with a collection of sample upgrade rules that can be used to add custom features to your upgrade solution. These XML documents and gmSL scripts are distributed as source that you may modify to fit your unique requirements. The sample rules were updated to reflect the latest product improvements and conventions. See also additions and changes in gmStudio Extensions Repository.

  • Adds sample Environment.std.xml to the gmStudio standard distribution
  • Adds sample rules for setting the base class for classes in the stub dependency framework

gmRTL is a sample runtime library that contains classes allowing for more readable translations. gmRTL namespace and class structure conventions will replace the legacy RTL conventions in the next gmStudio release. The old conventions (MigrationSupport, MigrationSupportUI, etc.) will be deprecated, but still available as custom migration options. Learn more about gmRTL here.

Great Migrations publishes a number of sample VB6/ASP upgrade solutions to illustrate the capabilities of gmStudio. The sample upgrade solutions and results were updated to reflect the latest product improvements and conventions. Learn about the samples here.

gmStudio Release News: Saturday, 05-March-2022

gmBasic is a code transformation tool that reads, interprets, and rewrites VB6/ASP/COM systems to one of the .NET languages (C# or VB.NET). Based on feedback from our clients and migration projects in the field, we are continuously improving gmBasic so as to help users more easily produce cleaner and more correct results. Most recently, this work includes general improvements needed to produce build-complete C# code for a Construction ERP product. This system is 31 inter-related VB6 project components containing 820K LOC organized into 1,125 code files and supported by 46 external COM libraries. This distribution, Version 40.25, includes several enhancements:

  • Improves handling the default member operator, ’!’
  • Improves handling inferring implicit references to default members
  • Improves handling of logic using ControlArrays
  • Improves handling recognizing references to unqualified global enumeration entries
  • Improves handling numeric literals using exponential notation
  • Improves handling of numeric values using hexadecimal notation in IDL to IDF
  • Improves parsing ASP attribute values containing complex VBScript logic
  • Improves migration of a local method to a custom call pattern
  • Improves migration of VBP information to AssemblyInfo content

gmStudio: Upgrade Solution Development Environment

Section titled “gmStudio: Upgrade Solution Development Environment”

Powered by gmBasic, gmStudio is a development environment for analyzing code and developing custom VB6/ASP/COM to .NET upgrade solutions. We are continuously adding functionality to gmStudio and making it easier to use. This distribution includes several enhancements:

  • Improves logic that maintains the Workspace runtime folder
  • Improves performance of .NET Build Log Report and the associated listing in the UI
  • Improves IDL/IDF handling of const = Infinity
  • Improves spawning a process without console logging
  • Improves ScriptRule command to allow script variables in the id attribute

gmAPI: a .NET API for Developing Advanced Upgrade Solutions

Section titled “gmAPI: a .NET API for Developing Advanced Upgrade Solutions”

Powered by gmBasic, gmAPI is a .NET API for automating our upgrade engine and accessing the semantic models produced by our unique linguistic compilation technology. gmAPI also includes classes for managing complex upgrade rules and integrating with gmStudio. This API was updated to reflect the latest product improvements and conventions.

gmMetrics: Advanced Metrics Reporting tool

Section titled “gmMetrics: Advanced Metrics Reporting tool”

gmMetrics is a tool for reporting the content of system models generated by gmBasic. This includes Symbol Tables, References Reports, Definitions Reports, and Model Audits. gmMetrics is a console application written in C# using gmAPI. We maintain and enhance gmMetrics to keep it in sync with the model schema and to produce new reports.

gmStudio ships with a collection of sample upgrade rules that can be used to add custom features to your upgrade solution. These XML documents and gmSL scripts are distributed as source that you may modify to fit your unique requirements. The sample rules were updated to reflect the latest product improvements and conventions. See also additions and changes in gmStudio Extensions Repository.

  • Adds MSCAL.ocx.WinForms.Refactor.xml
  • Improves GM.MSCAL.OCX.xml
  • Improves mscomctl.ocx.WinForms.Transform.gmsl
  • Improves scrrun.dll.Transform.gmsl
  • Improves StubControlBaseClass.Rules.xml
  • Improves StubControlBaseClass.xml
  • Improves wpfSubsystem.gmsl

gmRTL is a sample runtime library that contains classes allowing for more readable translations. gmRTL namespace and class structure conventions will replace the legacy RTL conventions in the next gmStudio release. The old conventions (MigrationSupport, MigrationSupportUI, etc.) will be deprecated, but still available as custom migration options. Learn more about gmRTL here.

  • Improves gmRTL.GUI.ControlHelper.GetDrawStyle/SetDrawStyle.style

Great Migrations publishes a number of sample VB6/ASP upgrade solutions to illustrate the capabilities of gmStudio. The sample upgrade solutions and results were updated to reflect the latest product improvements and conventions. Learn about the samples here.

VB6/COM Still declining in popularity

I just had a customer ask me about the future of COM support on Windows. Here is how I responded



Someone mentioned they had heard the VB6 runtime will not be supported beyond Windows10 (2025?). I could not find any official word on that. But I know there is no support statement for VB6 on Windows 11 — but that is not an official Windows release yet, so…

One thing: COM is a typically 32-bit technology and special steps are needed to work on 64-bit. On 64bit, which is what most Windows installations are running any more, COM must run in a 32-bit emulation. Maybe you have noticed VB6 COM references need to be to files in the SysWOW64 folder, not the System32 folder…

Bottom line, VB6 and COM may be officially supported by Microsoft, but they are not mainstream anymore. As time goes on, you are more likely to run into difficult issues with them; you will find yourself in troubled waters, in a boat by yourself without a paddle… And more importantly, all VB6 programmers will eventually leave the labor pool. Organizations still running VB6 will have no one to go to for help when they have technical problems. Organizations may choose to bear that risk and continue to put out VB6/COM compatibility fires as they come up, or they can upgrade their systems and join the much larger community of .NET/C# developers on a vital, well-supported platform.

To give you an idea about the level of interest in VB6 vs C# here are some relevant metrics:


Google Search (June 2021)

Search StringResults
”VB6 Programming”14,500
”C# Programming”2,270,000
”VB.NET Programming”175,000

GitHub (Jan 2022)

Search String (based on file extension)Results
VBP https://github.com/search?q=extension%3Avbp&type=Code260,579
CSPROJ https://github.com/search?q=extension%3Acsproj&type=Code7,223,451
VBPROJ https://github.com/search?q=extension%3Avbproj&type=Code185,686


Here are some details on VB6 support from Microsoft.
https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6-support-policy


Support Statement for Visual Basic 6.0

Visual Basic 6.0 Support Policy

http://docs.microsoft.com
Download: