Some notes on software development... RSS 2.0
# Wednesday, 31 July 2013

Whilst tying to open a legacy app at work today there were multiple ‘Object Library Not Registered’ errors. Looking at the offending form log file shows some Microsoft common controls that don’t appear to get loaded correctly:


Current development environment is Windows 7 64-bit. Strangely I has previously managed to build the same application from the VB6 IDE a few months ago. Having searched the web it looks like the automatic upgrade of IE10 has broken something with the registration of MSCOMCTL.OCX….thanks Microsoft.

The Answer
Apparently uninstalling IE10 fixes the issue. For me this is not an option as I require IE10 during everyday development.
There were also many posts about re-registering MSCOMCT.OCX & MSCOMCT2.OCX from the SYSWOW64 folder…this did not work for me.

The post mentioned above contains the answer, see post #60
Register the MSDATSRC.TLB file using REGTLB.EXE from an elevated visual studio command prompt like so:

regtlb C:\Windows\SysWOW64\msdatsrc.tlb


Bingo! VB6 IDE is up and running……can’ believe I’m still mentioning VB6 in 2013 :-/

Windows 7 64-bit -- Library Not Registered problem

Common controls do not load in VB6 after IE10 installation

Wednesday, 31 July 2013 16:57:51 (GMT Standard Time, UTC+00:00)  #    -
# Thursday, 31 May 2012

If you are unfortunate enough to be working with VB6, VBScript, Classic ASP and COM components on a 64-bit machine you need to make sure your calling code is running the same process type as the COM component.

When you register a 32-bit COM component on a 64-bit machine it adds all the relevant bits to the HKEY_CLASSES_ROOT\Wow6432Node\CLSID node in the registry.
Here I have registered a 32-bit COM component and searched for it’s class id:


If the consuming client is running in a 64-bit process, when it tries to create the object it will fail because it will look in the default 64-bit area of the registry.

For my tests I have a COM component registered called HTestLibrary.

I have the following VBScript to create the object:

    Dim y
    Set y = CreateObject("HTestLibrary3.MyClass3")

    MsgBox y.GetTestString3()

Running the VBScript directly on 64-bit machine caused the following error:


By default the the script runner (cscript or wscript) is run under a 64-bit process so the COM registry lookup fails. To run the script under 32-bit process you need run the 32-bit version of cscript or wscript, this can be done by using the 32-bit version of CMD:



Classic ASP
The error you get when using Classic ASP in 64-bit mode is ‘Automation server can't create object’. To fix this you need to set the application pool for the website to run under 32-bit process so in the advanced settings for the application pool set the ‘Enable 32-Bit applications’ setting to true:


MSDN - COM Component Compatibility
SO - How do I run a VBScript in 32-bit mode on a 64-bit machine?

Thursday, 31 May 2012 09:25:09 (GMT Standard Time, UTC+00:00)  #    -
Classic ASP | COM | VB6

Sign In
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019
Hadrian Phillips

All Content © 2019, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)