When I use dwlwin.exe as COM object server for the development of simultaneous download on multi-port serial interfaces. firstly, I have registered the server(dwlwin.exe /regserver). but when I start download, it return error code=5 (missing download file ). the bin and e2p files are included.
the source code is as below:
pDWLWin->setDownloadOptions(
6,
115200,
"E:\\work\\M100EVO\\Q24",
"pro-dwl.wpb|WIPSoft_v311.wpb|",
"q24pl001.e2p|w.e2p|",
"",
1,
1,
1,
0,
0,
0,
4,
0,
"");
pDWLWin->start(6);
Sleep(500);
pDWLWin->getProgress(6);
bool bConnected = false;
while(!pDWLWin->isDownloadOver(6))
{
::Sleep(500);
if(!bConnected && pDWLWin->isBootOk(6))
{
printf("DWLWin is connected\n");
bConnected = true;
}
}
int nExitCode = pDWLWin->getErrorCode(6);
_bstr_t bsMessage = pDWLWin->translateErrCode(nExitCode);
printf("Exit message = %s (code %d)\n",(LPCTSTR)bsMessage, nExitCode);