Thanks for you answer.
I'm found interface information with help Windows tool OLEVIEW.EXE (open only with administrator rights). In the branch Type Libraries found my lib.
My solutions:
1)
{
Q_OBJECT
public:
CZKFPEngX()
{
setControl
(QString::fromUtf8("{CA69969C-2F27-41D3-954D-A48B941C3BA7}"));
}
...
};
class CZKFPEngX : public QAxObject
{
Q_OBJECT
public:
CZKFPEngX()
{
setControl(QString::fromUtf8("{CA69969C-2F27-41D3-954D-A48B941C3BA7}"));
connect(this,SIGNAL(exception(int,QString,QString,QString)),this,SLOT(slotException(int,QString,QString,QString)));
}
...
};
To copy to clipboard, switch view to plain text mode
2) 
CZKFPEngX zkfpEng;
connect(&zkfpEng,SIGNAL(OnImageReceived(bool&)), SLOT(imageReceived(bool&)));
connect(&zkfpEng,
SIGNAL(OnCapture
(bool,
QVariant)),
SLOT(capture
(bool,
QVariant)));
connect(&zkfpEng,SIGNAL(OnFeatureInfo(int)), SLOT(featureInfo(int)));
CZKFPEngX zkfpEng;
connect(&zkfpEng,SIGNAL(OnImageReceived(bool&)), SLOT(imageReceived(bool&)));
connect(&zkfpEng,SIGNAL(OnEnroll(bool,QVariant)), SLOT(enroll(bool,QVariant)));
connect(&zkfpEng,SIGNAL(OnCapture(bool,QVariant)), SLOT(capture(bool,QVariant)));
connect(&zkfpEng,SIGNAL(OnFeatureInfo(int)), SLOT(featureInfo(int)));
To copy to clipboard, switch view to plain text mode
3) 
{
dynamicCall("SaveJPG(const QString&)",FileName);
}
int InitEngine()
{
int result = dynamicCall("InitEngine()").toInt();
return result;
}
void SaveJPG(QString FileName)
{
dynamicCall("SaveJPG(const QString&)",FileName);
}
int InitEngine()
{
int result = dynamicCall("InitEngine()").toInt();
return result;
}
To copy to clipboard, switch view to plain text mode
New question
4)
I have method in CZKFPEngX:
bool GetFingerImage(QVariant& AFingerImage)
{
//bool result;
//static BYTE parms[] = VTS_PVARIANT ;
//InvokeHelper(0x2e, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, AFingerImage);
//return result;
bool result = dynamicCall("GetFingerImage(QVariant&)",AFingerImage).toBool(); //result is true, if finger was captured
return result;
}
bool GetFingerImage(QVariant& AFingerImage)
{
//bool result;
//static BYTE parms[] = VTS_PVARIANT ;
//InvokeHelper(0x2e, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, AFingerImage);
//return result;
bool result = dynamicCall("GetFingerImage(QVariant&)",AFingerImage).toBool(); //result is true, if finger was captured
return result;
}
To copy to clipboard, switch view to plain text mode
When i'm invoke it from my dialog class:
void CDemoDlg::test()
{
qDebug() << image.isNull();
qDebug() << zkfpEng.GetFingerImage(image);
qDebug() << image.isNull();
QImage img
= image.
value<QImage>
();
if(!img.save("image.bmp","BMP"))
qDebug() << "some error";
}
void CDemoDlg::test()
{
QVariant image;
qDebug() << image.isNull();
qDebug() << zkfpEng.GetFingerImage(image);
qDebug() << image.isNull();
QImage img = image.value<QImage>();
if(!img.save("image.bmp","BMP"))
qDebug() << "some error";
}
To copy to clipboard, switch view to plain text mode
at console:
true
true
true
some error
true
true
true
some error
To copy to clipboard, switch view to plain text mode
i.e. object object image is not written to by reference. With other similar methods the same situation. What am I doing wrong? Thanks.
Bookmarks