我为我正在使用的第 3 方库创建了一个测试应用程序,它编译得很好,但似乎从来没有达到 __stdCall WriteDone。
从示例代码看起来像这个函数
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.";
}