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. Initial Steps required for Making the DLL as COM DLL(no GUI based).
Forum Updated to NodeBB v4.3 + New Features

Initial Steps required for Making the DLL as COM DLL(no GUI based).

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.7k Views 1 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.
  • F Offline
    F Offline
    feedmeqt
    wrote on last edited by
    #1

    Hi,

    I've no previous experience with Microsoft COM component and its usage (Not even windowsOS based development ). At present I've a requirement of making my dll as COM component(the dll is not for a GUI, its a Qt class without any GUI content.) . I've read some wiki materials(Qt forums) but couldn't associate with the Qt based COM development.

    Those who have made any similare development based on COM, their input on this would be a great help.

    Thanks,

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      To achieve this, you must use "QAxServer module":http://doc.qt.nokia.com/4.7/qaxserver.html which is part of the "Active Qt Framework":http://doc.qt.nokia.com/4.7/activeqt.html#activeqt-framework

      There are also many "examples on ActiveQt":http://doc.qt.nokia.com/4.7/examples-activeqt.html
      The "COM App Example":http://doc.qt.nokia.com/4.7/activeqt-comapp.html has several simple COM objects

      Otherwise just look, how the UI objects are done, simple objects should be the same or even simpler...

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        feedmeqt
        wrote on last edited by
        #3

        Hi,

        Tanx for your reply. I was trying out the samples and atlast did something which resulted in COM, I guess. But, i had done something like commenting Q_OBJECT without which i'm getting some error like

        "

        GeneratedFiles\Debug\moc_classA.cpp(42): error C2039: 'staticMetaObject' : is not a member of 'scanner' ".

        The "scanner" class which is an 3rd party header file, which is an abstract class for which i've to implement some function from it.

        Interface of ClassA looks are shown below,
        @
        class CLASSA_EXPORT ClassA : public QAxBindable, public scanner {

        Q_OBJECT
        .....
        };
        @
        moc_classA.cpp, adds automatically something like shown below,

        @
        const QMetaObject ClassA::staticMetaObject = {
        { &scanner::staticMetaObject, qt_meta_stringdata_ClassA,
        qt_meta_data_ClassA, 0 }
        };
        @
        I don't know how to remove "staticMetaObject" , so commented the Q_OBJECT required.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          feedmeqt
          wrote on last edited by
          #4

          Hi,

          I've removed that error by putting the QWidget class as lafirst tem in the derived class list.

          @
          class CLASSA_EXPORT ClassA : public QWidget, public QAxBindable, public scanner { Q_OBJECT ..... };
          @

          Thanks,

          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