Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qt COM tlb library issue



  • Hi, I have a COM tlb library generated from c# code, then I followed this post How to include a COM tlb library in my C++ project and used qt's dumpcpp.exe to have the COM library consumed by my Qt applicaiton .
    It works great on my local computer(windows 10), but when I transferred my application to another computer, I got this error-CoCreateInstance failure (Class not registered) , I can't figure out why since it works great on my local machine, did I miss some important dependencies like some dlls ? The two machines are both Windows10-64bits , Thanks for the help !!

    Here is how I configured and transferred my code using CMake:

    • find_package(Qt5AxContainer REQUIRED) + target_link_libraries( Qt5::AxContainer) to link to AxContainer library( I assume this is a static linking as I can't find a dll called Qt5AxContainer.dll in my E:\Qt\5.12.11\msvc2017_64 Dir

    • Copy the original COM.dll

    • Copy all the Qt's required dlls like Gui, core etc .



  • Hi, COM works fine across computers on a LAN, nothing needs to be changed in your Qt app.
    Instead, you need to configure the specific COM interfaces you're using to call across the network. To to that, you need to run dcomcnfg.exe (it's installed in all WIndows computers).



  • Hi, COM works fine across computers on a LAN, nothing needs to be changed in your Qt app.
    Instead, you need to configure the specific COM interfaces you're using to call across the network. To to that, you need to run dcomcnfg.exe (it's installed in all WIndows computers).



  • 微信图片_20211008001300.png
    thanks for the tip! so I need to edit the Security setting of my COM object in this DCOM Config drop-down right ? But it seems I can't find my COM project with the Specific Guid in this drop-down view @hskoglund



  • Sorry, last time I used dcomcnfg was before the turn of the century, so I have only vague memories, I seem to remember you started at the receiving computer (a.k.a. DCOM server) and declare the COM interface available through DCOM and also turn on network sharing so that the C:\ drive on that computer can be reached via a net use on the sending/client computer (so that the network security is ok). Also if you have connection problems try turning off the firewall on both computers.

    Google could be your friend here :-)


Log in to reply