Page 1 of 2 12 LastLast
Results 1 to 40 of 45

Thread: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Just purchased a new PC Windows 7 32 Bit (not SP1).

    Installed Visual Studio 6 Enterprise Editon, with no problems. (Ran the install as 'Administrator'). Applied SP6 also no problems.

    When trying to open a Project using MSCOMCTL.OCX (in this case a ListView) I am seeing "MSCOMCTL.OCX could not be loaded". I've Googled around and searched but can't find a solution that works. I've un-registered and re-registered the Control but still see the same Error.

    Worse still, if I create a new Project and add MSCOMCTL.OCX from the Project -> Components Menu, draw a ListView on the Form and then use the Object Browser to examine the Properties etc., VB6 Crashes.

    Any ideas ?

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Doog....same issue, same ocx (I think) awhile back. I copied the ocx form sys32 to 'my' directory (anyone under my profile), added THAT copy of the ocx to the project (browsed when adding ocx), and it worked. Only happened once..don't even remember which project. AND, as you said, "ANY ideas?" :-)

  3. #3
    gibra
    Guest

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Perhaps, the problems arise because you have installed VS6.0 EE in an inappropriate way.
    With my VS6 Installer tool I have installed on Windows 7 32/64 bit in the Home Premium, Professional and Ultimate with or without SP1.

    I use juts VS6.0 EE on Windows 7 64bit (no SP1): no problem here!

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Wrong:

    This is a protected Windows system component and has been for a long time. Windows File Protection was vastly improved starting in Vista, which means that it is much harder to mess up than with the old System File Protection in Win2K, Me, and XP.

    So that means it is tough to "break" this OCX now. It probably won't even stay unregistrered if you try to. Windows should come along and shovel up the mess you leave like those guys who follow the elephants in a parade.


    Sorry about that, I knew better. This library is not supplied by Windows.


    What I suspect has occurred, and this isn't a good sign (what the heck are you running on that system?) is that your VB6 design-time licenses are corrupted. In your case this may just have been the result of a silent failure during the installation process. The registry doesn't "just break" contrary to what people may think.

    If this is the problem there may be an easy fix, and one that hurts nothing to try anyway. See:

    FILE: VB6Cli.exe Fixes License Problems with Visual Basic 6.0
    Last edited by dilettante; Jan 19th, 2013 at 02:41 PM. Reason: huge blunder, apoligies

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by gibra View Post
    Perhaps, the problems arise because you have installed VS6.0 EE in an inappropriate way
    I just ran the Setup with elevated privileges ("Run As Administrator"), no problems were reported, the Installation just went on OK.

    @Sam: Tried that, still get the same problem. VB Crashing when using that OCX in a new Project is my major concern. It allows me to add the Control and draw the ListView on them Form with no problems.

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by Doogle View Post
    I just ran the Setup with elevated privileges ("Run As Administrator"), no problems were reported, the Installation just went on OK.
    Did you run both phases of the install elevated? Normally there's a first run and a reboot, then when the second phase starts after booting you need to kill that and run it elevated.

    Quote Originally Posted by Doogle View Post
    VB Crashing when using that OCX in a new Project is my major concern. It allows me to add the Control and draw the ListView on them Form with no problems.
    Ouch. That sounds like a different problem from design-time licenses. But I'd try that fixup utility anyway just for grins.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Tried that, makes absolutely no difference it reports that "Enterprise Design Licenses Have Been Installed Successfully".

    As to what's running on the System - nothing. It's a 'virgin' system with Visual Studio and Microsoft Office 2000 installed and that's about it (apart from Microsoft Security Essentials, which was installed after the problems I'm experiencing)

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by dilettante View Post
    Did you run both phases of the install elevated? Normally there's a first run and a reboot, then when the second phase starts after booting you need to kill that and run it elevated
    Ah, no I didn't do that. Thanks, I'll give it a try.

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Really seems odd that only that one OCX would be impacted by whatever has gone wrong though.

  10. #10
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Hmm, what about the issues discussed in:

    VB6 IDE cannot load MSCOMCTL.OCX after update KB 2687323

    Specifically this part:

    The difference is a nasty line in my vbp stating "NoControlUpgrade=1" which controls the "Upgrade ActiveX Controls" checkbox in project properties. When you have the check ticked, this line does not appear in vbp and it silently upgrades the OCX to 2.1. When it is unchecked (i.e. it is 1) you cannot load the project

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Interesting, I looked at the Project File which had
    Code:
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
    changing that to
    Code:
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
    solved the problem with that Project.

    There's no "NoControlUpgrade=1" in the vbp file
    Code:
    Type=Exe
    Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\Windows\system32\stdole2.tlb#OLE Automation
    Reference=*\G{00020905-0000-0000-C000-000000000046}#8.0#409#..\..\Program Files\Microsoft Office\Office12\MSWORD.OLB#Microsoft Word 8.0 Object Library
    Reference=*\G{00000206-0000-0010-8000-00AA006D2EA4}#2.6#0#..\..\Program Files\Common Files\System\ado\msado26.tlb#Microsoft ActiveX Data Objects 2.6 Library
    Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\..\Windows\system32\MSDBRPTR.DLL#Microsoft Data Report Designer 6.0 (SP4)
    Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\..\Windows\system32\MSSTDFMT.DLL#Microsoft Data Formatting Object Library 6.0 (SP6)
    Reference=*\G{3D5C6BF0-69A3-11D0-B393-00A0C9055D8E}#1.0#0#..\..\Program Files\Common Files\designer\MSDERUN.DLL#Microsoft Data Environment Instance 1.0 (SP4)
    Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\..\Windows\system32\MSBIND.DLL#Microsoft Data Binding Collection VB 6.0 (SP4)
    Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\Windows\system32\scrrun.dll#Microsoft Scripting Runtime
    Reference=*\G{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}#1.0#0#..\..\Windows\system32\SHELL32.dll#Microsoft Shell Controls And Automation
    Reference=*\G{AC3B8B4C-B6CA-11D1-9F31-00C04FC29D52}#2.6#0#..\..\Program Files\Common Files\System\ado\msjro.dll#Microsoft Jet and Replication Objects 2.6 Library
    Object={C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0; MSMASK32.OCX
    Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
    Object={CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0; MSDATGRD.OCX
    Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
    Form=frmSplash.frm
    Form=mdiMenu.frm
    Form=frmMessage.frm
    Form=frmTktType.frm
    Form=frmCustomer.frm
    Module=modForm; modForm.bas
    Module=modGeneral; modGeneral.bas
    Module=modValidate; modValidate.bas
    Form=frmMachines.frm
    Form=frmProblems.frm
    Module=modPostcode; modPostcode.bas
    Form=frmMachineAlloc.frm
    Form=frmSim.frm
    Form=frmUpdateErrors.frm
    Form=frmTicketAlloc.frm
    Form=frmTicketAlert.frm
    Form=frmMeters.frm
    Form=frmStatement.frm
    Form=frmInvoice.frm
    Form=frmReportInvoices.frm
    Form=frmReports.frm
    Module=modPrintStatements; modPrintStatements.bas
    Module=modPrintReports; modPrintReports.bas
    Form=frmReportSelection.frm
    Form=frmReportIssued.frm
    Form=frmSalesmen.frm
    Form=frmBackup.frm
    Form=frmNewData.frm
    Module=modSageIF; modSageIF.bas
    Module=modPrintLists; modPrintLists.bas
    Form=frmReportBoxes.frm
    Module=modPrintBoxes; modPrintBoxes.bas
    Form=frmUnreported.frm
    Form=frmUpdateDB.frm
    Module=modInvoice; modInvoice.bas
    Form=frmSetup.frm
    IconForm="frmSplash"
    Startup="frmSplash"
    HelpFile=""
    Title="PAYG"
    ExeName32="ClubLotteries.exe"
    Command32=""
    Name="prjClubLotteries"
    HelpContextID="0"
    CompatibleMode="0"
    MajorVer=2
    MinorVer=0
    RevisionVer=3
    AutoIncrementVer=0
    ServerSupportFiles=0
    VersionComments="Live"
    VersionCompanyName="MWT Enterprises"
    VersionProductName="Thomas & Anca PAYG"
    CompilationType=0
    OptimizationType=0
    FavorPentiumPro(tm)=0
    CodeViewDebugInfo=0
    NoAliasing=0
    BoundsCheck=0
    OverflowCheck=0
    FlPointCheck=0
    FDIVCheck=0
    UnroundedFP=0
    StartMode=0
    Unattended=0
    Retained=0
    ThreadPerObject=0
    MaxNumberOfThreads=1
    DebugStartupOption=0
    
    [MS Transaction Server]
    AutoRefresh=1

    However, I'm still crashing VB in a new Project after adding MSCOMCTL.OCX and attempting to use the Object Browser.

  12. #12
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    The problem I met before,after uninstall a software. Try to reinstall VB6/SP6.

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Here's one last idea.

    Go into the folder where MSCOMCTL.OCX is (should be System32) and look for MSCOMCTL.OCA, remove that file (or if paranoid rename it .BAK etc.) and then try starting a new VB6 project and MSCOMCTL.OCX and using it.

  14. #14
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    @ Doogle,

    What happens if you updated Win7 to SP1?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Thanks for your help, I did as suggested but it didn't make any difference.

    I guess you were right and there's been a 'silent' failure during the install so perhaps I'll just remove and re-install with UAC turned off and see if it makes any difference. I don't know if it's related but when I try to install Office 2007 the Setup comes up with a "Setup has stopped working" message and aborts. That might be something to do with already having Office 2000 Pro and Office 2003 Standard installed. (Don't ask why!)

    Have to go back to a 'clean machine' and start over.

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by Nightwalker83 View Post
    @ Doogle,

    What happens if you updated Win7 to SP1?
    I gues that'll be another bag of worms. It's currently in the process of installing 134 Security Updates (over 500 Mb of them). I thought that W7 was 'secure' - makes you wonder whether it's fit for purpose, or 'Security Update' is just a 'catch-all'.

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Well, performed a re-install on a 'clean machine' and the problem still exists.

    The stupid thing is that I can use a ListView OK but if I try to look at MSComctlLib in the Object Browser VB crashes.

  18. #18
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Coincentally, yesterday I tried setting a ListView's AllowColumnReorder property to True on a simple project. As soon as
    I clicked on a columnheader to drag it, the program crashed, both in the IDE and compiled, with and without Upgrade AX Controls checked.
    (BTW XP Sp3, VB6 SP6).

    After googling for a while I noted that some users downloaded a previous version of the OCX, which seemed to fix
    their problems, but I don't really want to go that way. Hoping someone comes up with a solution.

  19. #19
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by Doogle View Post
    Well, performed a re-install on a 'clean machine' and the problem still exists.

    The stupid thing is that I can use a ListView OK but if I try to look at MSComctlLib in the Object Browser VB crashes.
    I met this problem before. The reason is that I installed then uninstalled a poor written software which used MSComctl.ocx. I uninstalled/installed VB6/SP6, the problem remained. Then I manually renamed C:\windows\system32\mscomctl.ocx and put new mscomctl.ocx from my vb6/sp6 installation package and registered MSConctl.ocx by Regsvr32 in DOS command window. Problem is resolved.

    I attached mscomctl.ocx info for your reference.

    Name:  mscomctl.jpg
Views: 63142
Size:  102.2 KB

  20. #20
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    BTW, http://www.microsoft.com/en-us/downl....aspx?id=10019
    fixed the ColumnReorder problem for me. Not sure if it will fix the problem for the OP.

  21. #21
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    For completeness, the previous version was 6.1.97.82 and the downloaded version now reads 6.1.97.86

  22. #22
    gibra
    Guest

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by VBClassicRocks View Post
    Coincentally, yesterday I tried setting a ListView's AllowColumnReorder property to True on a simple project. As soon as
    I clicked on a columnheader to drag it, the program crashed, both in the IDE and compiled, with and without Upgrade AX Controls checked.
    (BTW XP Sp3, VB6 SP6).
    I installed VS6 with my VS6 Installer tool and this does not happen.
    In fact I have no problems of any kind, nor with Windows 7 or Windows 8.

    I have 6.1.97.82 version.
    Last edited by gibra; Jan 20th, 2013 at 08:57 AM.

  23. #23
    gibra
    Guest

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by Doogle View Post
    Well, performed a re-install on a 'clean machine' and the problem still exists.
    The stupid thing is that I can use a ListView OK but if I try to look at MSComctlLib in the Object Browser VB crashes.
    Have you tried my tool VS6 Installer?

  24. #24
    New Member
    Join Date
    Apr 2013
    Posts
    2

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Hi Forum,

    I'm having the same problem with a VB6 project which was compiled on the 8th of March this year. Now, whenever I open the vb6 project I get the annoying message:

    'C:\Windows\SysWOW64\MSCOMCTL.OCX' could not be loaded--Continue Loading Project?
    I'm running Windows 7 64 bit. Everything worked well on the 8th of March 2013. But to day, no chance.

    I've checked the object version in the .vbp-file and it is set to 2.1 since months:
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
    Running the .exe file works fine. In the Process Explorer I see that the .exe loaded the C:\Windows\SysWOW64\MSCOMCTL.OCX.

    I have no clue why I can't use (add the OCX in the Project > Components ... > Components Dialog > Microsoft Windows Common Controls 6.0 (SP6) but the exe works!

    Things I tried without success:
    • Unregistering, Registering did not solve the problem.
    • Installing VB6 SP6 did not solve the problem.
    • Using other version of the MSCOMCTL.OCX
    • Changing the object version in the .vbp-file


    I don't want to restore a System Restore Point before 8th of March though...

    Any ideas are appreciated.

    cheerioh
    SiS

  25. #25
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Don't know if it's the same thing you're talking about but I ran into similar trouble and had to uninstall IE10 to solve it:

    http://www.vbforums.com/showthread.p...stered-problem
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  26. #26
    New Member
    Join Date
    Apr 2013
    Posts
    2

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    I could solve my problem: after I checked the updates newer than 8th of March 2013 I googled for the specfic update and mscomctl.ocx - and guess what! Yes, I found the following post. It states uninstalling IE10 would solve the problem.

    I unstalled IE10 and voilà, everything worked like a charm!!!!!!!

    Oh g*d d*mn M$!!! Since 1990 I am a business and private client of your products... but from now on you will surley understand I won't pay anymore for your products!

    HTH
    cheerioh
    SiS

  27. #27
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Odd that IE-10 would impact ListView control installation.
    But, if that does the trick, great.

  28. #28
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    We had a very similar thing occur installing Microsoft Office 2010 last week. We ended up re-registering the control.

  29. #29
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    uninstall IE 10
    sholud work for you

  30. #30
    New Member
    Join Date
    Mar 2015
    Posts
    1

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by salsa31 View Post
    uninstall IE 10
    sholud work for you
    Amazing that this problem is still alive and kicking, and it took me several hours to solve it for me - thanks to all above for input and ideas.

    From what I can make out, it seems the problem is linked to the special security measures in windows 8 (maybe earlier as well) and linked to how the explorer searches the indicated folders.

    For me the problem was with the MSCOMM32.OCX file. I downloaded it into System32 folder as everyone suggested, ran the regsrv32 but got error messages that it could not find the file. The file was also not visible via the Project>Add References section of VST 2013 - although other .ocx files were visible.

    After checking one of these other files, it seems that the security has a special user called "TrustedInstaller" and my file I copied did not have this user defined. It was also not possible to actually assign this user, so I was stuck.

    Following what some others had earlier suggested I removed the file from the system32 folder and copied it instead into my Visual Studio 2013 folder (i.e. in my case: c:\users\keith\documents\Visual Studio 2013) and finally now the file could be seen from VST 2013, via: Project, Add Reference, and then clicking on browse and going to the folder. However the file would still not load.

    In order to solve this I had to register the ocx using Regsvr32 on a command line (Admin) prompt, but it still tricky since I had to navigate the way to the above folder (using cd commands) before the regsvr32 command finally worked.

    After this the ocx file was loaded into VST2013 (Project, Add Reference, Browse or also now visible as Microsoft Comm Control 6.0) and all that was now left was to prefix my MSComm assignment in VST2013 (VB) with MSCommLib.MSComm and finally the error was gone....

    So (for the record and hope that someone else might benefit and save wasting hours) to summarise the procedure I successfully used...

    1. Copy the MSCOMM32.OCX file to your Visual Basic Studio 2013 folder
    in my case: c:\users\keith\documents\Visual Studio 2013

    2. Open a Command Prompt (Admin) and navigate your way to your visual basic studio 2013 folder,
    in my case cd c:\users\keith\documents\Visual Studio 2013
    maybe you have to do this in steps depending on how long your path name is (limitations in the CMdLine prompt), i.e.
    in my case:
    cd c:\users
    cd keith
    cd documents
    cd Visual Studio 2013


    3. run the RegSrv32 command from your new current directory (the visual studio 2013 folder)
    in my case: RegSrv32 MSCOMM32.OCX
    after this works you can quit the command prompt window.

    4. go back to VST2013 and assign the reference
    Project, Add Reference, COM, Type Libraries and the scan down to "Microsoft Comm Control 6.0" and select in the check-box and click OK, or
    Project, Add Reference, Browse, the click the Browse button and navigate to your visual studio 2013 folder and check the MSCOMM32.OCX file, the click OK.

    5. Rerun the build/debug (F5) and check the error is gone. If not you might need to prefix the MsComm definition, i.e.
    in my case: Dim WithEvents MSComm1 As MSCommLib.MSComm

    in my case the above worked successfully in the build process, although I am a long way away from actually running the code at the moment, but nothing yet to indicate it should not work.....

  31. #31
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Don't gravedig old threads.

    Your MSComm32.ocx problem is unrelated to topic of this thread anyway.


    This is not a free OCX. If your version and edition of Visual Studio included a license for its use then it should already have been installed or a separate installation package provided for it.

    See You receive an error message "You do not have a license to use this control" when you use Visual Basic 6.0 controls in Visual Studio 2005 or in Visual Studio .NET

    However it isn't clear whether or not later versions of VS include the required controls and licenses to use them.


    It has nothing to do with "how explorer searches folders" and if you don't know about TrustedInstaller you are incompetent to write programs for Windows.

  32. #32
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by dilettante View Post
    if you don't know about TrustedInstaller you are incompetent to write programs for Windows.
    Wow...that was some tough love
    Please remember next time...elections matter!

  33. #33
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Well dead horses can only be beaten so much before you hardly have dog food left.

    These post-XP topics were throughly documented for programmers back in 2006 in web pages, multiple downloadable documents, PowerPoint presentations, videos, etc. Microsoft had an entire web site devoted to the topic. Since then we're forced to repeat the information again, and again, and again...

    It is now 2015 and we should be spared this. The vestiges remain in rewritten articles on MSDN for those who open their eyes.

    Supported Resource Replacement Mechanisms

    Understanding Windows File And Registry Permissions

    Windows Vista Application Development Requirements for User Account Control Compatibility

  34. #34
    New Member
    Join Date
    Jul 2015
    Posts
    1

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Had VB6 IDE running well on W8.1 and W7, but new install on W7 on TWO new machines refused to register MSCOMCTL.OCX and one other OCX. After many re-installs, re-registers, re-boots (yuk) all strangely to no avail finally removed MS Internet Explorer 11 (add/remove examine update/uninstall) cleared up EVERYTHING - thanks for all the hints.

    Oddly primary computer has IE 11 installed together with VB6/VS6 and has not problem with this.

  35. #35
    Fanatic Member DrUnicode's Avatar
    Join Date
    Mar 2008
    Location
    Natal, Brazil
    Posts
    631

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Had this issue when IE10 was installed via automatic updates.
    Maybe similar issue with IE11.
    The final (correct) fix (in lieu of uninstalling IE10) was:

    To fix run elevated (Admin) command prompt:

    x64
    ---
    cd C:\Windows\SysWOW64\
    regtlib msdatsrc.tlb

    x86
    ---
    cd C:\Windows\System32\
    regtlib msdatsrc.tlb

  36. #36
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Quote Originally Posted by KeithD View Post
    Amazing that this problem is still alive and kicking, and it took me several hours to solve it for me - thanks to all above for input and ideas.

    From what I can make out, it seems the problem is linked to the special security measures in windows 8 (maybe earlier as well) and linked to how the explorer searches the indicated folders.

    For me the problem was with the MSCOMM32.OCX file. I downloaded it into System32 folder as everyone suggested, ran the regsrv32 but got error messages that it could not find the file. The file was also not visible via the Project>Add References section of VST 2013 - although other .ocx files were visible.

    After checking one of these other files, it seems that the security has a special user called "TrustedInstaller" and my file I copied did not have this user defined. It was also not possible to actually assign this user, so I was stuck.

    Following what some others had earlier suggested I removed the file from the system32 folder and copied it instead into my Visual Studio 2013 folder (i.e. in my case: c:\users\keith\documents\Visual Studio 2013) and finally now the file could be seen from VST 2013, via: Project, Add Reference, and then clicking on browse and going to the folder. However the file would still not load.

    In order to solve this I had to register the ocx using Regsvr32 on a command line (Admin) prompt, but it still tricky since I had to navigate the way to the above folder (using cd commands) before the regsvr32 command finally worked.

    After this the ocx file was loaded into VST2013 (Project, Add Reference, Browse or also now visible as Microsoft Comm Control 6.0) and all that was now left was to prefix my MSComm assignment in VST2013 (VB) with MSCommLib.MSComm and finally the error was gone....

    So (for the record and hope that someone else might benefit and save wasting hours) to summarise the procedure I successfully used...

    1. Copy the MSCOMM32.OCX file to your Visual Basic Studio 2013 folder
    in my case: c:\users\keith\documents\Visual Studio 2013

    2. Open a Command Prompt (Admin) and navigate your way to your visual basic studio 2013 folder,
    in my case cd c:\users\keith\documents\Visual Studio 2013
    maybe you have to do this in steps depending on how long your path name is (limitations in the CMdLine prompt), i.e.
    in my case:
    cd c:\users
    cd keith
    cd documents
    cd Visual Studio 2013


    3. run the RegSrv32 command from your new current directory (the visual studio 2013 folder)
    in my case: RegSrv32 MSCOMM32.OCX
    after this works you can quit the command prompt window.

    4. go back to VST2013 and assign the reference
    Project, Add Reference, COM, Type Libraries and the scan down to "Microsoft Comm Control 6.0" and select in the check-box and click OK, or
    Project, Add Reference, Browse, the click the Browse button and navigate to your visual studio 2013 folder and check the MSCOMM32.OCX file, the click OK.

    5. Rerun the build/debug (F5) and check the error is gone. If not you might need to prefix the MsComm definition, i.e.
    in my case: Dim WithEvents MSComm1 As MSCommLib.MSComm

    in my case the above worked successfully in the build process, although I am a long way away from actually running the code at the moment, but nothing yet to indicate it should not work.....
    Are you talking about MSCOMM32.OCX or MSCOMCTL.OCX?

  37. #37
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Today Win7 autoupdate cause MSCOMCTL.ocx problem. My old method failed. Still troubleshooting...
    Attached Images Attached Images    
    Last edited by Jonney; Dec 9th, 2015 at 06:08 AM.

  38. #38
    gibra
    Guest

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"


  39. #39
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    Conclusion:
    ALL above methods don't work for me.
    1. I have install SP6 -setupsp6.exe (not VB6 installer) many times, still failed.
    2. regtlib msdatsrc.tlb doesn't work
    3. regsvr32 mscomctl.ocx doesn't work
    4. manually copy mscomctl.ocx from other PC then regsvr32, failed

    5. Download latest "Microsoft Visual Basic 6.0 Service Pack 6 Cumulative Update" then insatll, WORKS!

    Thanks stackoverflow, it is trusted website.

    Specified answer :
    These are outdated: you want to be using Microsoft Visual Basic 6.0 Service Pack 6 Cumulative Update (kb957924) – puetzk Oct 22 at 19:39
    Last edited by Jonney; Dec 9th, 2015 at 05:37 PM.

  40. #40
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Windows 7, 32 bit - MSCOMCTL.OCX "could not be loaded"

    I haven't read this entire thread, but this might help: https://support.microsoft.com/en-us/kb/896559
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width