如何从自定义 DLL 将 ActiveX 控件添加到 Qt 表单
好吧,我正在尝试实现以下目标:将 ActiveX 控件(来自 AutoDesk 的 AxExpressViewerDll::AxCExpressViewerControl)添加到 Qt 表单。但是,无法从 DLL 中加载对象,例如(长数字是从 Visual Studio 获取的 UUID):
QAxWidget* wmp = new QAxWidget();
wmp->setControl("{55523A67-A054-4064-B88D-0070305C9F95}");
VS 很好地获取了 COM 对象,.dll (AdView.dll) 已使用 regsvr32 注册,我什至使用 LIBS 指令将 dll 直接链接到项目。我什至尝试过这个: 链接
我总是得到:
CoCreateInstance 失败(类不是 已注册)
QAxBase::setControl: 请求控制 {55523A67-A054-4064-B88D-0070305C9F95} 无法实例化
任何帮助将不胜感激
Well, I'm trying to achieve the following: add and ActiveX control (AxExpressViewerDll::AxCExpressViewerControl from AutoDesk) to a Qt form. But, there is no way to get the object to load from DLL, for example (the long number is the UUID taken from Visual Studio):
QAxWidget* wmp = new QAxWidget();
wmp->setControl("{55523A67-A054-4064-B88D-0070305C9F95}");
VS picks up the COM object fine, the .dll (AdView.dll) was registered with regsvr32, I even linked the dll directly to the project with the LIBS directive. I even tried this: link
I always get:
CoCreateInstance failure (Class not
registered)QAxBase::setControl:
requested control
{55523A67-A054-4064-B88D-0070305C9F95}
could not be instantiated
Any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几个月后回答,但仍然可能有帮助:
也许你应该看看 qtbrowser 插件: http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/
直接使用qt,而不是开发ActiveX然后嵌入到qt中。除非你希望你的activeX在qt之外可用......
answsered after months, but still might be helpful :
Maybe you should take look at the qtbrowser plugin : http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/
Instead of developing and ActiveX and then embedding it into qt, use directly qt. Unless you want your activeX to be available outside qt...