Results 1 to 1 of 1

Thread: problems with dynamicCall please help, I can not advance

  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default problems with dynamicCall please help, I can not advance

    Hi to all, I'm disperate with this ActiveQt especially calling some com functions with dynamicCall and I don't get any help from this forum.

    So I try again:
    I have a COM object named PallyCOM.dll
    I generated the doc with this code:
    Qt Code:
    1. m_axobj->setControl("{1AF66B3E-B0D5-4108-80B5-13E429298140}");
    2.  
    3.  
    4. QString d = m_axobj->generateDocumentation();
    5.  
    6. QFile file("file.xml");
    7. if(!file.open(QIODevice::WriteOnly | QIODevice::Text))
    8. return;
    9.  
    10. QTextStream out(&file);
    11. out << d;
    To copy to clipboard, switch view to plain text mode 

    it generated a xml file. I would call a routine called GetUserData.
    The xml file says this:
    QVariant GetUserData (QString CardID) [slot]
    Connect a signal to this slot:
    QObject::connect(sender, SIGNAL(someSignal(QString)), object, SLOT(GetUserData(QString)));
    Or call the function directly:
    QVariantList params = ...
    QVariant result = object->dynamicCall("GetUserData(QString)", params);
    But I really don't understand how to call it.
    I tried many way and no one works:

    Qt Code:
    1. QVariantList params;
    2. QStringList userdata;
    3. userdata.append( userId_ );
    4. m_axobj->dynamicCall("GetUserData(QString)", params);
    5. userdata = params.toStringList();
    6.  
    7. qDebug() << userdata.count(); //it says 0
    To copy to clipboard, switch view to plain text mode 

    this routine should return an array of string as the (very poor) doc says:

    Function: GetUserData
    Parameter: CardID(string/10)
    Description: Get User Data
    Return values: ArrayList
    I realy don't understand how to call such routine and I need some help.
    I also tried:

    Qt Code:
    1. QVariantList list = m_axobj->dynamicCall("GetUserData(QString)","a string value"); //doesn't work
    To copy to clipboard, switch view to plain text mode 

    and

    Qt Code:
    1. QVariant list = m_axobj->dynamicCall("GetUserData(QString)","a string value"); //doesn't work
    2. QStringList userdata = list.toStringList();
    To copy to clipboard, switch view to plain text mode 

    I always get an empty list.

    Please help me, I don't know where I'm wrong.

    The returned value should be a QString array so:

    CardID(string/10)
    OverWrite(0: no overwrite. If ID is already registered, return with result 06.,1: overwrite.)
    idxDesignation
    idxDepartment
    FirstName(string /15)
    LastName(string /15)
    idxGroup (integer/0~255)
    Status(1 : Activate, 0 : Deactivate)
    WorkMode(0:finger+pass ,1:finger,2ass,3:finger or pass,4:Only Crad,5:Only from external Reader,6:Matching on Mifare card)
    WorkTimeStart()
    WorkTimeEnd()
    EmployeeID
    RegisterMode( Finger =1, Password = 2, Finger and Password = 3, Card=4, Max=4)
    CheckExpire
    ExpireDateStart
    ExpireDateEnd
    Password(string/10)
    NF(Number of fingerprint data per user Max. 2)
    TemplateSize
    FingerData (byte,User Fingerprint data total size depends on the number of fingerprints registered per user)
    And I always get an empty list
    Best Regards
    Last edited by franco.amato; 16th April 2010 at 23:26.
    Franco Amato

Similar Threads

  1. Problems with s60
    By emrares in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 8th January 2010, 11:23
  2. Replies: 1
    Last Post: 28th May 2008, 16:52
  3. Ssl problems
    By Unplugged in forum Newbie
    Replies: 3
    Last Post: 4th October 2007, 07:02
  4. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.