none
HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

    Question

  • Hi,
    i've done an application which uses COM interop to access some functions of a third party application.
    the calls to the COM Object have been copied from an VBA example
    the reference to the tlb of the 3rd party application has been added to the project and compared to the referencees set in the vba example file. All references are set the same.

    if i compile and run it on my computer everything works just perfect but when i try to run my application on antoher pcs i get:

      error component not registered with CLSID {744C513B-1EB6-4DA6-89E8-864C87E34A7E} HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). :

    i've checked the installation and registration of .net and the third party app , the vba example is working on every computer just my program doesn't work i checked the paths to the COM references and searched the registry for a component with the CLSID from the error message. i also searched using regdll viewer.

    platform is set to x86 , the dll /tlb stuff has been registered an dis the exact same on both pcs

    please help me i'm going nuts i'm searching since 2 weeks now, my application is ready to be released it#s just not working on any computer except mine :(  thanks in advance.

    The programm consist of only some COM calls


    • Edited by Marcel' Monday, July 09, 2012 9:46 AM
    Monday, July 09, 2012 9:31 AM

Answers

  • HKEY_CLASSEES_ROOT is a legacy registry hive abandoned as far ago as Windows 95.  Today, this hive is a calculated merge between HKLM\SOFTWARE\Classes and HKCU\SOFTWARE\Classes.  So, what you see as HKCR\3rdpartyappname.objectname is really either under HKCU\SOFTWARE\Classes or HKLM\SOFTWARE\Classes.  Find out which one.  This particular registry key that you found is the ProgID registration, which maps a human-readable object name to its preferred ID:  The Class ID, or CLSID.  This registry key is really only needed if you don't know the CLSID, so it really is optional.

    After that you MUST have (HKCU or HKLM)\Software\Classes\CLSID\<the object's class ID> as stated in my first answer.  Since you are not finding this entry, this is why you get the error.  Why is the VBA working?  I don't really know as it works with the same mechanism, or so I have thought until today.

    Bottom line is:  You need those registry keys.  If self-registering the ActiveX dll doesn't provide the correct keys then your network installation has to be modified so those entries are included.  This way your program will work.


    Jose R. MCP
    Code Samples

    • Marked as answer by Marcel' Thursday, July 12, 2012 7:04 AM
    Tuesday, July 10, 2012 2:26 PM
  • finally i've got it!

    some strange error but i hope it will help somebody, i ve been searching 8h a day a complete week!

    works on every PC:      

    3dpartyApplication = CreateObject("  3dpartyApplication. Application")
            Dim wert As wert
            Dim data As werte
           data =   3dpartyApplication .wert

    works only on my office PC ^^

            Dim wert As 3dpartyApplication .wert
            Dim data As 3dpartyApplication .werte
            data = New 3dpartyApplication .werte()

    • Marked as answer by Marcel' Thursday, July 12, 2012 7:04 AM
    Thursday, July 12, 2012 6:59 AM

All replies

  • Class not registered means that the registry keys HKCU\Software\Classes\{744C513B-1EB6-4DA6-89E8-864C87E34A7E} or HKLM\Software\Classes\{744C513B-1EB6-4DA6-89E8-864C87E34A7E} don't exist or aren't accessible to the user running the application.  You need either one and you need it accessible to the user running the application (registry keys are securable objects, meaning the user must have read access).  If you are running this program in a 64-bit PC, the keys go into the virtualized view for 32-bit.  First thing to do:  Check that the user running the applciation indeed CAN access the key.  Also check the subkeys to make sure the InProcServer32 key value is there and pointing to the right DLL.

    Since the VBA application works, I imagine the keys are in fact there.  Is the same user running the VBA and your app?  You could write a log file and create a special build of your application that checks on the registry keys manually and logs the result of the check in the log file.


    Jose R. MCP
    Code Samples

    Monday, July 09, 2012 4:24 PM
  • Hi thank you very much for your help. i really aprreciate it, now i'm understanding at least a little bit more.

    In the VBA example there are only 2 references 1. to the tlb of the third party app and 1 OLE Automation (??)

    both of them are referenced as the exact same files in my project.

    in the registry:
    there is an entry called CLSID  under HKEY_CLASSES_ROOT 3rdpartyappname.objectname, this is the only entry which is returned when searching for the CLSID, changing / deleting the CLSID number of this entry has no effect,  in  the CLSID Folder there 's no CLSID with the ID of the error message. if i create a new one with a placeholder my program is executed correctly.

    user is the same (company domain network) , OS is the same (dualboot 2x Win XP prof.), the 3rd party app is the same (network install)

    Now i have two questions:

    Why is the VBA code working?

    How do i know how to create the correct CLSID entry? i tried referencing the tlb file and a lot of other stuff ( 4hours :( )but nothing worked except the fact that now it isn't working on any machine. not even my backup code.

    tia

    Tuesday, July 10, 2012 10:25 AM
  • HKEY_CLASSEES_ROOT is a legacy registry hive abandoned as far ago as Windows 95.  Today, this hive is a calculated merge between HKLM\SOFTWARE\Classes and HKCU\SOFTWARE\Classes.  So, what you see as HKCR\3rdpartyappname.objectname is really either under HKCU\SOFTWARE\Classes or HKLM\SOFTWARE\Classes.  Find out which one.  This particular registry key that you found is the ProgID registration, which maps a human-readable object name to its preferred ID:  The Class ID, or CLSID.  This registry key is really only needed if you don't know the CLSID, so it really is optional.

    After that you MUST have (HKCU or HKLM)\Software\Classes\CLSID\<the object's class ID> as stated in my first answer.  Since you are not finding this entry, this is why you get the error.  Why is the VBA working?  I don't really know as it works with the same mechanism, or so I have thought until today.

    Bottom line is:  You need those registry keys.  If self-registering the ActiveX dll doesn't provide the correct keys then your network installation has to be modified so those entries are included.  This way your program will work.


    Jose R. MCP
    Code Samples

    • Marked as answer by Marcel' Thursday, July 12, 2012 7:04 AM
    Tuesday, July 10, 2012 2:26 PM
  • finally i've got it!

    some strange error but i hope it will help somebody, i ve been searching 8h a day a complete week!

    works on every PC:      

    3dpartyApplication = CreateObject("  3dpartyApplication. Application")
            Dim wert As wert
            Dim data As werte
           data =   3dpartyApplication .wert

    works only on my office PC ^^

            Dim wert As 3dpartyApplication .wert
            Dim data As 3dpartyApplication .werte
            data = New 3dpartyApplication .werte()

    • Marked as answer by Marcel' Thursday, July 12, 2012 7:04 AM
    Thursday, July 12, 2012 6:59 AM
  • I'm struggling how to do this for a c sharp application

    working vb .net code:

     Dim 3rdpartyapp As 3rdpartyapp .Application
            3rdpartyapp = CreateObject("3rdpartyapp .Application")
            Dim wert As wert
            Dim daten As werte
            daten = 3rdpartyapp.werte

    my attempt at c#

       3rdpartyapp.Application   3rdpartyapp ;
       Object 3rdpartyapp = Interaction.CreateObject("3rdpartyapp.Application");
       3rdpartyapp.werte daten = 3rdpartyapp.werte;
         

    i know its a real mess  i cant acces 3rdpartyapp.whatever like in VB .net after importing the tlb and creating the COM Object.

    i tried several tutorials on how to access a COM object correctly in c sharp but this seems not to work. however if i do:

                    object oData = Interaction.CreateObject("DataAl.Application");
                    DataAl.Medplanverordnungen oMedplanverordnungen;
                    oMedplanverordnungen = new DataAl.Medplanverordnungen();

    in my c sharp application i'm back at the start , it works on my office pc but anywhere else it fails.

    if i can't get this to work probably i need to recode the qwhole application in vb lol :( :(

    thanks in advance.

    Thursday, July 12, 2012 10:32 AM