I bought Fingerprint reader ZK7500, it SDK is written in MFC. I want to remake it to Qt.
1) to code
ax
->setControl
(QString::fromUtf8("{CA69969C-2F27-41D3-954D-A48B941C3BA7}"));
QAxWidget *ax = new QAxWidget();
ax->setControl(QString::fromUtf8("{CA69969C-2F27-41D3-954D-A48B941C3BA7}"));
To copy to clipboard, switch view to plain text mode
I received a warning
QAxBase: Unhandled type LPSTR
To copy to clipboard, switch view to plain text mode
This is critical?
2) at MFC inbound events handled as follows:
BEGIN_EVENTSINK_MAP(CDemoDlg, CDialog)
//{{AFX_EVENTSINK_MAP(CDemoDlg)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 8 /* OnImageReceived */, OnOnImageReceivedZkfpengx2, VTS_PBOOL)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 10 /* OnCapture */, OnOnCaptureZkfpengx2, VTS_BOOL VTS_VARIANT)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 9 /* OneEnroll */, OnOnEnrollZkfpengx2, VTS_BOOL VTS_VARIANT)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 5 /* OnFeatureInfo */, OnOnFeatureInfoZkfpengx2, VTS_I4)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
BEGIN_EVENTSINK_MAP(CDemoDlg, CDialog)
//{{AFX_EVENTSINK_MAP(CDemoDlg)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 8 /* OnImageReceived */, OnOnImageReceivedZkfpengx2, VTS_PBOOL)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 10 /* OnCapture */, OnOnCaptureZkfpengx2, VTS_BOOL VTS_VARIANT)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 9 /* OneEnroll */, OnOnEnrollZkfpengx2, VTS_BOOL VTS_VARIANT)
ON_EVENT(CDemoDlg, IDC_ZKFPENGX2, 5 /* OnFeatureInfo */, OnOnFeatureInfoZkfpengx2, VTS_I4)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
To copy to clipboard, switch view to plain text mode
How to do it on Qt? I have not found *.TLB file with definitions of functions.
3) I have many functions generated by MFC Wizard such as:
void SaveJPG(LPCTSTR FileName)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x18, DISPATCH_METHOD, VT_EMPTY, NULL, parms, FileName);
}
long InitEngine()
{
long result;
InvokeHelper(0x1a, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
return result;
}
...
void SaveJPG(LPCTSTR FileName)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x18, DISPATCH_METHOD, VT_EMPTY, NULL, parms, FileName);
}
long InitEngine()
{
long result;
InvokeHelper(0x1a, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
return result;
}
...
To copy to clipboard, switch view to plain text mode
I found this topic, but did not work out. How it correctly to remake to Qt.
Sorry for my Google Translate.
Bookmarks