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. QT + ActiveX / COM issue with SnelStartGateway.dll

QT + ActiveX / COM issue with SnelStartGateway.dll

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 578 Views
  • 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.
  • B Offline
    B Offline
    BenV666
    wrote on last edited by
    #1

    Hej folks,

    I'm trying to make a QT5 (windows) Desktop application (using the msvc2013 compiler with QT Creator) that uses "SnelStartGateway.dll", which is an ActiveX dll that allows programs to interact with the SnelStart accounting software.
    I've registered the dll in windows with regsvr32 and added a line in the project file:
    TYPELIBS = $$system(dumpcpp -getfile {63A21693-4122-45B5-96B6-919C78D7EBF5})
    This generates a cpp and h file that I included.

    Now for the fun part:
    The DLL exposes a few classes, starting with a SnelStartGateway::clsGWaySnelStart class / object that I can instantiate and work with. It also includes a SnelStartGateWay::clsGWayLoginSettings object that I can instantiate and use to enter login settings.
    My problem arrives when trying to use this instance of SnelStartGateWay::clsGWayLoginSettings to call the mtdGWayAdmiOpenenViaLoginSettings method of the SnelStartGateway::clsGWaySnelStart instance. The dumpcpp generated SnelStartGateway.h claims that this method requires SnelStartGateWay::_clsGWayLoginSettings as parameter 1 (note the underscore) instead of the object I can instantiate.
    When I try to make a SnelStartGateWay::_clsGWayLoginSettings object and enter settings it fails with:
    QAxBase::qt_metacall: Object is not initialized, or initialization failed
    If I try to enter the non underscore object it won't accept it and can't typecast it with succes either.

    One way of obtaining a 'working' SnelStartGateWay::_clsGWayLoginSettings instance is through the prpGWayLoginSettingsGet() method in SnelStartGateway::clsGWaySnelStart, but this opens a dialog that needs user interaction which I really don't want.

    I've also tried to call setControl on the underscore version of the loginsettings object to set it to the control of the non underscore version ({0a4ca491-e6bf-48e8-81f7-f9233de2c8f1} which I got from the .h file), which works for entering the settings, but then the call to mtdGWayAdmiOpenenViaLoginSettings fails with:
    QAxBase: Error calling IDispatch member mtdGWayAdmiOpenenViaLoginSettings: Type mismatch in parameter 1

    Does anyone know a solution? :)

    Thanks for reading!

    Wouter

    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