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. '_RemotableHandle' type error when trying to use ActiveX in Qt
Forum Updated to NodeBB v4.3 + New Features

'_RemotableHandle' type error when trying to use ActiveX in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 328 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Taytoo
    wrote on last edited by
    #1

    We have an internal ActiveX COM control (written in C++) that I'm trying to use in the new Qt app. Note that we've successfully used it in regular C++ and also in WinForms (.NET) windows applications and it works.

    I used dumpcpp to generate .h/.cpp files, which worked without any issue but the code won't compile because of missing _RemotableHandle definition. I do see a forward declaration for it though, actually its in the header file twice (but only declaration):

    struct _RemotableHandle;
    

    Spent some time on google and it looks like this is a COM type used for HWND. How do I fix this error? I don't see anyone else having this issue, maybe I'm doing something wrong?

    1 Reply Last reply
    1
    • G Offline
      G Offline
      Gao.xiangyang
      wrote on last edited by
      #2

      "I'm using dumpcpp to generate .h/.cpp files for mstscax.dll, but in the .h file, only the declaration of the struct _RemotableHandle is present. Have you found a solution for this?"

      G 1 Reply Last reply
      0
      • G Gao.xiangyang

        "I'm using dumpcpp to generate .h/.cpp files for mstscax.dll, but in the .h file, only the declaration of the struct _RemotableHandle is present. Have you found a solution for this?"

        G Offline
        G Offline
        Gao.xiangyang
        wrote on last edited by
        #3

        @Gao-xiangyang

        通过查看
        echo '#import "mstscax.dll" named_guids' > import.cpp
        cl.exe /c /nologo .\import.cpp
        midl.exe .\mstscax.idl /header mstscax.h /iid mstscax_i.c
        dumpcpp .\mstscax.tlb

        By comparing the mstscax.idl file with the .h file generated by dumpcpp, it was found that dumpcpp has issues with handling typedefs, for example:

        in .idl file

         typedef [public]
            _RemotableHandle* wireHWND;
        
            typedef union tag__MIDL_IWinTypes_0009 {   
              long hInproc;
              long hRemote;
            } __MIDL_IWinTypes_0009;
        
            typedef struct tag_RemotableHandle {       
              long fContext;
              __MIDL_IWinTypes_0009 u;
            } _RemotableHandle;
        
        

        dumpcpp.exe output .h file

            //  The struct tag_RemotableHandle is declared twice.
            struct tag_RemotableHandle; 
            struct tag_RemotableHandle;
        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