Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt COM tlb library issue
Forum Updated to NodeBB v4.3 + New Features

qt COM tlb library issue

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 411 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    junzhe fan
    wrote on last edited by
    #1

    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 .

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      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).

      1 Reply Last reply
      1
      • J Offline
        J Offline
        junzhe fan
        wrote on last edited by junzhe fan
        #3

        微信图片_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

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          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 :-)

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved