dumpcpp.exe not working properly on clsid.
-
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! -
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\" -
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\" -
@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.
@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 :) -
@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 :) -
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()); }
-
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()); }
@hskoglund It Works. Thank you!