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. dumpcpp.exe not working properly on clsid.
Forum Updated to NodeBB v4.3 + New Features

dumpcpp.exe not working properly on clsid.

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 879 Views 2 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.
  • K Offline
    K Offline
    Ketan
    wrote on last edited by
    #1

    I've been trying to generate .cpp, .h files of an activex using dumpcpp.exe but there isn't any progress yet.
    Cmd : dumpcpp -getfile {6BF52A52-394A-11d3-B153-00C04F79FAA6}

    P.S: I don't want to generate files using source dll. Requirement is to generate files with CLSID.
    Thanks!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      It checks a certain key.

      if (category == TypeLibID) {
              QSettings settings(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes\\TypeLib\\") +
                                 QString::fromLatin1(typeLib.constData()), QSettings::NativeFormat);
              typeLib = QByteArray();
              QStringList codes = settings.childGroups();
              for (int c = 0; c < codes.count(); ++c) {
                  typeLib = settings.value(QLatin1String("/") + codes.at(c) + QLatin1String("/0/win32/.")).toByteArray();
                  if (QFile::exists(QString::fromLatin1(typeLib))) {
                      break;
                  }
              }
      

      so first step is to check if its actually such clSid ( in registry )
      in the location
      QLatin1String("HKEY_LOCAL_MACHINE\Software\Classes\TypeLib\"

      K 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        It checks a certain key.

        if (category == TypeLibID) {
                QSettings settings(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes\\TypeLib\\") +
                                   QString::fromLatin1(typeLib.constData()), QSettings::NativeFormat);
                typeLib = QByteArray();
                QStringList codes = settings.childGroups();
                for (int c = 0; c < codes.count(); ++c) {
                    typeLib = settings.value(QLatin1String("/") + codes.at(c) + QLatin1String("/0/win32/.")).toByteArray();
                    if (QFile::exists(QString::fromLatin1(typeLib))) {
                        break;
                    }
                }
        

        so first step is to check if its actually such clSid ( in registry )
        in the location
        QLatin1String("HKEY_LOCAL_MACHINE\Software\Classes\TypeLib\"

        K Offline
        K Offline
        Ketan
        wrote on last edited by
        #3

        @mrjj Checked. It exists, so does the problem. Also, I'm not including TYPELIB in my project. I'm running dumpcpp.exe directly through command prompt. This doesn't occur if I'm using .dll file instead of CLSID.

        mrjjM 1 Reply Last reply
        1
        • K Ketan

          @mrjj Checked. It exists, so does the problem. Also, I'm not including TYPELIB in my project. I'm running dumpcpp.exe directly through command prompt. This doesn't occur if I'm using .dll file instead of CLSID.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Ketan
          The docs just says
          "-getfile libid Print the filename for the typelibrary libid to stdout"

          nothing about it will generate files. So i wonder if it should and its a bug or
          it only wants DLLs.
          Give it a day. Someone is bound to have tried this :)

          K 1 Reply Last reply
          1
          • mrjjM mrjj

            @Ketan
            The docs just says
            "-getfile libid Print the filename for the typelibrary libid to stdout"

            nothing about it will generate files. So i wonder if it should and its a bug or
            it only wants DLLs.
            Give it a day. Someone is bound to have tried this :)

            K Offline
            K Offline
            Ketan
            wrote on last edited by
            #5

            @mrjj Ah, okay! Is there any other way to get files?

            mrjjM 1 Reply Last reply
            0
            • K Ketan

              @mrjj Ah, okay! Is there any other way to get files?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Ketan
              well normally that is via the DLL.
              But it sounds like you need not to use the dlls ?

              K 1 Reply Last reply
              0
              • mrjjM mrjj

                @Ketan
                well normally that is via the DLL.
                But it sounds like you need not to use the dlls ?

                K Offline
                K Offline
                Ketan
                wrote on last edited by
                #7

                @mrjj I do want to. Is it possible to get dll path based on ActiveX control name? If not, any other alternative will be highly appreciated. Thanks!

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

                  Hi, to get the dll path you can search for it in the Windows registry, here's a Qt console test program:

                  include "qsettings.h"
                  #include "stdio.h"
                  
                  void main(int argc, char *argv[])
                  {
                      QString progid = *++argv;
                      if (progid.isEmpty())
                          progid = "WMPlayer.ocx";  // default (6BF52A52-394A-11d3-B153-00C04F79FAA6)
                  
                      QSettings s1(QString("\\HKEY_CLASSES_ROOT\\%1\\CLSID").arg(progid),QSettings::NativeFormat);
                      QString clsid = s1.value(".").toString();
                  
                      QSettings s2(QString("\\HKEY_CLASSES_ROOT\\CLSID\\%1\\InprocServer32").arg(clsid),QSettings::NativeFormat);
                      puts(s2.value(".").toString().toLatin1());
                  }
                  
                  K 1 Reply Last reply
                  6
                  • hskoglundH hskoglund

                    Hi, to get the dll path you can search for it in the Windows registry, here's a Qt console test program:

                    include "qsettings.h"
                    #include "stdio.h"
                    
                    void main(int argc, char *argv[])
                    {
                        QString progid = *++argv;
                        if (progid.isEmpty())
                            progid = "WMPlayer.ocx";  // default (6BF52A52-394A-11d3-B153-00C04F79FAA6)
                    
                        QSettings s1(QString("\\HKEY_CLASSES_ROOT\\%1\\CLSID").arg(progid),QSettings::NativeFormat);
                        QString clsid = s1.value(".").toString();
                    
                        QSettings s2(QString("\\HKEY_CLASSES_ROOT\\CLSID\\%1\\InprocServer32").arg(clsid),QSettings::NativeFormat);
                        puts(s2.value(".").toString().toLatin1());
                    }
                    
                    K Offline
                    K Offline
                    Ketan
                    wrote on last edited by Ketan
                    #9

                    @hskoglund It Works. Thank you!

                    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