QAxObject and dynamicCall
I'm trying to read a proprietary file through the vendor's COM file (dll). I am using QAxObject to open the file, but do not know if I'm calling these functions properly:
long GetVersionNumber(long FAR* pnVersion)
long GetFileName(BSTR FAR* pbstrFileName)
long GetInstSoftwareVersion(BSTR FAR* pbstrInstSoftwareVersion)
long Open(LPCTSTR szFileName)
So, far the following seems to work (no crashes or errors), except the 2nd dynamicCall():
@ int n = 0;
QString qs = "blank";
QAxObject* ptr = new QAxObject( "MSFileReader.XRawfile", 0 );
n = ptr->dynamicCall("Open(const QString&)","C:\some.raw").toInt();
n = ptr->dynamicCall("GetInstSoftwareVersion(QString &)", qs).toInt(); //qs is still "blank"
n = ptr->dynamicCall("Close()").toInt();
Well, answering myself, but the making a html from generateDocumentation().toStdString() was useful.
It works partially. I can call functions, but can't get results back from them.
I can get results back from int&, but can't get any values back from QString&. I've also used both flavors of dynamicCall().