Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-124905

dumpcpp.exe has issues with handling typedefs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.14 VxWorks
    • ActiveX Support
    • None
    • windows11
    • Windows

    Description

      I am using dumpcpp.exe to load the mstscax.dll control, but the generated .h file is missing some structures, causing my project to fail compilation.

      To address this, I used the command
      ```
      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
      ```
      to obtain the mstscax.idl file, then compiled it to obtain TYPELIB using .

      Afterward, when I regenerated the .h file using dumpcpp.exe, I found the following issues upon comparison with mstscax.idl:

      1. In the IDL file, typedef [public] declarations of structs and enums are all using their original names. For example:
      ```
      typedef [public] _MIDL__MIDL_itf_mstsax_0000_0058_0001 RemoteProgramResult;
      ```
      The resulting .h file retains the name _MIDL__MIDL_itf_mstsax_0000_0058_0001, and this name is also used in interface functions as RemoteProgramResult.

      The content in my attachment:
      midl.exe .\mstscax.idl /header mstscax.h /iid mstscax_i.c
      output: -> mstscax.h & mstscax_i.c & mstscax.tlb
      dumpcpp.exe mstscax.tlb
      output: -> mstsclib.h & mstsclib.cpp

      If you need to know more details, please contact me.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owolff Oliver Wolff
            gao.xiangyang GAO XIANGYANG
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes