Support Statement: Duplicate COM symbols in different TypeLibs

In a legacy code, two different COM IDFs defined the same class -- MSCOMCT2.DataObject and MSCOMCTL.DataObject

gmBasic seems to take the first one as the source; in this case MSCOMCT2.

I want to use the MSCOMCTL once since that custom IDF has more customizations and the type was being used in the context of other MSCOMCTL types.

Ultimately, its one of those things where we probably need to either duplicate work or do what I did which was pre-edit a fully qualified name:

 <Replace status="active" name="make sure the tool picks up MSComCtlLib.DataObject instead of MSCOMCt2">
   <OldBlock><![CDATA[ As DataObject]]></OldBlock>
   <NewBlock><![CDATA[ As MSComCtlLib.DataObject]]></NewBlock>
</Replace>

Another option is to create a merged custom IDF for all the different versions of Windows Common Controls (This is something we routinely do for ADODB); however, that won't work in general, as you can see in the example below:

C:\Users\mark>dir \Windows\SysWOW64\*comct*.ocx
 
06/24/1998 12:00 AM   164,144 COMCT232.OCX
06/24/1998 12:00 AM   369,696 COMCT332.OCX
06/24/1998 12:00 AM   609,584 COMCTL32.OCX 
11/25/2013 12:27 PM   660,120 mscomct2.ocx 
03/31/2014 09:46 PM 1,070,232 MSCOMCTL.OCX
 
 // typelib filename: MSCOMCTL.OCX // typelib filename: COMCTL32.OCX // typelib filename: COMCT332.OCX // typelib filename: COMCT232.OCX // typelib filename: mscomct2.ocx 

[
uuid(831FDD16-0C5C-11D2-A9FC-0000F8754DA1),
version(2.1),
helpstring("Microsoft Windows
Common Controls 6.0 (SP6)"),

helpfile("cmctl198.chm"),
helpcontext(0x00033450)
]
library MSComctlLib
{

interface IVBDataObject;

interface IVBDataObjectFiles;
interface ITabStrip;
dispinterface ITabStripEvents;
interface ITabs;
interface ITab;
interface IToolbar;
dispinterface IToolbarEvents;
interface IButtons;
interface IButton;
interface IButtonMenus;
interface IButtonMenu;
interface IStatusBar;
dispinterface IStatusBarEvents;
interface IPanels;
interface IPanel;
interface IProgressBar;
dispinterface IProgressBarEvents;
interface ITreeView;
dispinterface ITreeViewEvents;
interface INodes;
interface INode;
interface IListView;
dispinterface ListViewEvents;
interface IListItems;
interface IListItem;
interface IColumnHeaders;
interface IColumnHeader;
interface IListSubItems;
interface IListSubItem;
interface IImageList;
dispinterface ImageListEvents;
interface IImages;
interface IImage;
interface ISlider;
dispinterface ISliderEvents;
interface IControls;
interface IComboItem;
interface IComboItems;
interface IImageCombo;
dispinterface DImageComboEvents;

[
uuid(6B7E6392-850A-101B-AFC0-4210102A8DA7),
version(1.3),
helpstring("Microsoft Windows
Common Controls 5.0 (SP2)"),

helpfile("comctl1.hlp"),
helpcontext(0x00033450)
]
library ComctlLib
{
interface IVBDataObject;

interface IVBDataObjectFiles;
interface ITabStrip;
dispinterface ITabStripEvents;
interface ITabs;
interface ITab;
dispinterface ITabs10;
dispinterface ITab10;
dispinterface ITabStrip10;
interface IToolbar;
dispinterface IToolbarEvents;
interface IButtons;
interface IButton;
dispinterface IButtons10;
dispinterface IButton10;
dispinterface IToolbar10;
interface IStatusBar;
dispinterface IStatusBarEvents;
interface IPanels;
interface IPanel11;
interface IPanel;
dispinterface IPanels10;
dispinterface IPanel10;
dispinterface IStatusBar10;
interface IProgressBar;
dispinterface IProgressBarEvents;
dispinterface IProgressBar10;
interface ITreeView;
dispinterface ITreeViewEvents;
interface INodes;
interface INode;
dispinterface INodes10;
dispinterface INode10;
dispinterface ITreeView10;
interface IListView;
dispinterface ListViewEvents;
interface IListItems;
interface IListItem;
interface IColumnHeaders;
interface IColumnHeader;
dispinterface IListItems10;
dispinterface IListItem10;
dispinterface IColumnHeaders10;
dispinterface IColumnHeader10;
dispinterface IListView10;
interface IListItem11;
interface IListItems11;
interface IColumnHeader11;
interface IColumnHeaders11;
interface IListView11;
interface IImageList;
dispinterface ImageListEvents;
interface IImages;
interface IImage;
dispinterface IImages10;
dispinterface IImage10;
dispinterface IImageList10;
interface ISlider;
dispinterface ISliderEvents;
dispinterface ISlider10;
interface IControls;

[
uuid(38911DA0-E448-11D0-84A3-00DD01104159),
version(1.1),
helpstring("Microsoft Windows Common Controls-3 6.0"),
helpfile("cmctl398.chm"),
helpcontext(0x003d3011)
]
library ComCtl3
{
// TLib : Visual Basic runtime objects and procedures
: {EA544A21-C82D-11D1-A3E4-00A0C90AEA82}

importlib("3");

// Forward declare all types defined in this typelib
interface _CoolBar;
interface _Band;
interface _Bands;
interface _BandProperties;
interface _BandsPage;
interface _CoolBarPage;
dispinterface __CoolBar;

 

[
uuid(FE0065C0-1B7B-11CF-9D53-00AA003C9CB6),
version(1.1),
helpstring("Microsoft Windows
Common Controls-2 5.0 (SP2)"),

helpfile("comctl2.hlp"),
helpcontext(0x00035b60)
]
library ComCtl2
{ 

interface IVBDataObject;

interface IVBDataObjectFiles;
interface IAnimation;
dispinterface DAnimationEvents;
interface IUpDown;
dispinterface DUpDownEvents;

 

[
uuid(86CF1D34-0C5F-11D2-A9FC-0000F8754DA1),
version(2.0),
helpstring("Microsoft Windows
Common Controls-2 6.0 (SP6)"),

helpfile("cmctl298.chm"),
helpcontext(0x00035b60)
]
library MSComCtl2
{

interface IVBDataObject;

interface IVBDataObjectFiles;
interface IAnimation;
dispinterface DAnimationEvents;
interface IUpDown;
dispinterface DUpDownEvents;
interface IMonthView;
dispinterface DMonthViewEvents;
interface IDTPicker;
dispinterface DDTPickerEvents;
interface IFlatSB;
dispinterface DFlatSBEvents;

 

 

Â