dcsimg
Results 1 to 5 of 5

Thread: How to re-register COM Dll ?

  1. #1

    Thread Starter
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    571

    How to re-register COM Dll ?

    Hi,

    I have this entry in my registry on Windows XP:
    HKEY_CLASSES_ROOT\CLSID\{0B314611-2C19-4AB4-8513-A6EEA569D3C4}\InprocServer32
    @ = "C:\tool\v.1.0\mscomctl.ocx"
    that file is missing.

    When I run:
    Code:
    regsvr32 /u MSCOMCTL.OCX
    from my source code folder
    it doesn't remove that entry.

    And I run:
    Code:
    regsvr32 MSCOMCTL.OCX
    Windows write "dll is successfully registered", but it leave incorrect path in the registry and project can't be loaded.
    I usually modify path in vbp in production this way:
    Code:
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}##0; MSCOMCTL.OCX
    so it can accept any CORRECTLY registered mscomctl ocx with any version.

    I used Microsoft RegCleaner and it solved my problem by removing registry entries with missed path.
    Is there more standart way?

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,266

    Re: How to re-register COM Dll ?

    I use RegDLLView
    Easy to use for finding references which don't exists anymore and also for registering DLL/OCX files

  3. #3
    Member
    Join Date
    Jan 2018
    Posts
    35

    Re: How to re-register COM Dll ?

    Quote Originally Posted by Dragokas View Post
    I usually modify path in vbp in production this way:
    Code:
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}##0; MSCOMCTL.OCX
    so it can accept any CORRECTLY registered mscomctl ocx with any version.
    Hmm, that looks useful. Does it work with the IDE once you've made the change (and stick if you make other changes to the project), or is part of a custom build process?

  4. #4

    Thread Starter
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    571

    Re: How to re-register COM Dll ?

    ahenry, are you asking about compatibility in general?
    yes, before uploading project to github, I usually run such .bat file placed in the source files project folder:
    _RemoveMSComctlVer.bat (see attachment)

    it automatically remove version information from {831FDD16-0C5C-11D2-A9FC-0000F8754DA1} object in vbp file.

    After you open project with such vbp, you will get message like:
    Version 0.59386 of c:\......\MSCOMCTL.OCX is not registered. The control will be upgraded to version 2.1.
    And after saving the project, IDE will automatically update vbp file will correct version information, like:
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
    This allows you to distribute source code to PC with wide range of Windows versions where different version of ocx is already could be registered.
    However, as you can see, it does not solve the problem where ocx is registered, but the ocx file is now missing.
    I would call it bug with "regsvr32", because it can't correctly replace reg. info about path to ocx it try to register.

    Also, it is required you manually remove path here "#0; MSCOMCTL.OCX" (if IDE appended it to MSCOMCTL.OCX when you first time added ocx to project)
    as well as path of every references before code distibution.
    For "references" I used to use such .bat file (because IDE usually re-append path to some references after saving the project):
    _Normalize_VBP_References.bat (see attachment)

    Like:
    Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdole2.tlb#OLE Automation
    could not be opened on x32 system without correcting path to C:\Windows\System32 or better to remove it at all, like bat-file do:
    Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation
    It is good if you manually do the same (remove path) in Form= Class= Module= lines of vbp, and remove Path32= line at all (if exist).
    And, of course everything above should be suitable for any ocx-s, that you may use.

    Atually, many more things are required to add inter-OS compatibility like run vbp elevated first time, reg. msdatsrc.tlb and so.
    If you interested you can look on:
    1) https://github.com/dragokas/hijackth...!!!%20-%20.cmd
    2) https://github.com/dragokas/hijackth...e_UPX_Sign.cmd
    Recently, I supplemented it to be maximum portable on all 2k-10 OS at first project run/build.
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    Jan 2018
    Posts
    35

    Re: How to re-register COM Dll ?

    Yes, I'm looking for build compatibility going between Windows 2000 and W10. Curiously, I've never had a path problem with any of the standard references. But the general idea of doing an automated VBP search and replace before putting the project files in source control will be helpful. I think all I need right now is to set comctl32.ocx to interface 1.3 and MSCOMCTL.OCX to interface 2.0.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width