Results 1 to 4 of 4

Thread: Call ActiveX function with struct parametr

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Call ActiveX function with struct parametr

    I need to call some ActiveX function and one of paramters is a struct

    While calling a "segmentation fault" exception raizes



    //test.h
    #include <ActiveQt/QAxWidget>
    #include "windows.h"
    #include <QMetaType>
    class MapAxWidget : public QAxWidget
    {
    public:
    MapAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
    void test();
    typedef struct
    {
    long ForeColor;
    long BackgroundColor;
    }TPWPalette;
    }
    Q_DECLARE_METATYPE(MapAxWidget::TPWPalette);

    //test.cpp

    MapAxWidget::MapAxWidget(QWidget* parent, Qt::WindowFlags f )
    : QAxWidget(parent, f)
    {

    setControl({829A0FF0-B154-4CA9-AAD9-3FFF0FA875FE});

    }
    void MapAxWidget::test()
    {
    TPWPalette t1;
    t1.ForeColor = 1;
    t1.BackgroundColor = 1;
    QVariant param1;
    param1.setValue(t1);
    dynamicCall("testMSg(TPWPalette pallet)",param1); //Error raizes here




    // qaxbase.cpp
    long QAxBase::queryInterface(const QUuid &uuid, void **iface) const
    {
    *iface = 0;
    if (!d->ptr) { //Error shows here
    }




    If one could help, will be gratefull.

    P.S. English is not native language, so i am sorry for mistakes
    Last edited by agealex; 23rd October 2010 at 13:56.

Similar Threads

  1. Qt function call in vb.net
    By abghosh in forum Qt Programming
    Replies: 7
    Last Post: 6th March 2010, 18:00
  2. Replies: 0
    Last Post: 20th December 2009, 16:37
  3. Call to database function.
    By retto in forum Qt Programming
    Replies: 1
    Last Post: 14th September 2009, 13:29
  4. call function as Qstring
    By jcr in forum Qt Programming
    Replies: 1
    Last Post: 30th May 2009, 02:35
  5. function call
    By Walsi in forum Qt Programming
    Replies: 3
    Last Post: 12th June 2007, 10:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.