0
我爲我使用的第三方lib創建了一個測試應用程序,它編譯得很好,但似乎沒有打到__stdCall WriteDone。QT - 第三方回撥不回撥?
從示例代碼看起來這個功能
if(cmcd->BuildISOImage(isoName, &CMCDBurner::WriteDone, NULL) == TRUE)
{
qDebug() << "inside build iso";
}
調用此代碼,但據我所知它從來沒有在這裏使得它。
void __stdcall CMCDBurner::WriteDone(int DeviceId, bool Failed, void *arg)
{
qDebug() << "inside write done.";
}
這是整個測試應用程序
#include <QCoreApplication>
#include "Windows.h"
#include "MCDBcls.h"
#
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
char* cdDestination = "\\";
char* isoName = "C:\\LinearSystems\\AVCommand\\ISO\\aviso.iso";
CMCDBurner* cmcd = new CMCDBurner();
cmcd->ClearAll();
cmcd->InsertFile(cdDestination, "C:\\DLS\\Interviews\\Test_001\\20130515-87701\\interview.xml");
int c = cmcd->Prepare();
int b = cmcd->GetFilesCount();
if(cmcd->BuildISOImage(isoName, &CMCDBurner::WriteDone, NULL) == TRUE)
{
qDebug() << "inside build iso";
}
return a.exec();
}
void __stdcall CMCDBurner::WriteDone(int DeviceId, bool Failed, void *arg)
{
qDebug() << "inside write done.";
}
感謝,當我試圖產生錯誤:C2761:「無效CMCDBurner :: WriteDone(INT,BOOL,無效*)」 :不允許使用成員函數重新聲明 – rreeves
檢查我編輯的答案 –
我要試一試我將盡快更新* – rreeves