关于刻录程序的问题 各位高人: 用nero的开发包编写刻录程序,在连续刻录的时候只能刻录文件,不能刻录文件夹,怎么就可以把文件夹刻录上去?哪位有这方面的经验,指点一下,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 NERO_ISO_ITEM *NeroBuildIsoTreeFromPath( LPCTSTR lpszStartPath ){ NERO_ISO_ITEM *pIsoItem = NULL; NERO_ISO_ITEM *pPreviousIsoItem = NULL; CFileFind finder; CString strWildcard(lpszStartPath); strWildcard += _T("\\*.*"); BOOL bWorking =finder.FindFile(strWildcard); while( bWorking ) { bWorking = finder.FindNextFile(); if (finder.IsDots()) continue; pIsoItem = NeroCreateIsoItem(); // will be freed by NeroFreeIsoItemTree lstrcpyn( pIsoItem->fileName, finder.GetFileName(), 251 ); lstrcpyn( pIsoItem->sourceFilePath, finder.GetFilePath(), 251 ); pIsoItem->isDirectory=finder.IsDirectory(); pIsoItem->isReference=FALSE; // collecting the items backwards was easier to code pIsoItem->nextItem = pPreviousIsoItem; pPreviousIsoItem = pIsoItem; if ( finder.IsDirectory() ) pIsoItem->subDirFirstItem = NeroBuildIsoTreeFromPath( finder.GetFilePath() ); } finder.Close(); return pIsoItem;}在刻录函数里面加上下面的代码: niiTemp2=NeroCreateIsoItem(); //NERO_ISO_ITEM *niiTemp2; if(SingleFile)//刻单个文件 { strcpy(niiTemp2->fileName, mstrFileName); strcpy(niiTemp2->sourceFilePath, mstrPathName); niiTemp2->isDirectory=FALSE; niiTemp2->isReference=FALSE; niiTemp2->nextItem=NULL; } else//刻目录 niiTemp2 = NeroBuildIsoTreeFromPath((LPCTSTR)mstrPathName); 在C++里怎样得到刚插入数据库的记录的id值? 关于CListCtrl编辑的问题? 一个很烂的问题 在程序中调用CHM文件的问题....弄了很久...希望用过的来看看! 如何检测内存泄漏?可能是BSTR引起的 帮我看看这段代码是什么意思 请问各位如何写文档? 求教高手, 在线等待: 急!!!!!Shell_NotifyIcon的问题! UTF-8编码 ADO的get_recordcount函数(急!) 奇怪的CSOCKET问题 有没有用IMAPI实现光盘刻录的?请教几个问题
{
NERO_ISO_ITEM *pIsoItem = NULL;
NERO_ISO_ITEM *pPreviousIsoItem = NULL;
CFileFind finder; CString strWildcard(lpszStartPath);
strWildcard += _T("\\*.*");
BOOL bWorking =finder.FindFile(strWildcard); while( bWorking )
{ bWorking = finder.FindNextFile(); if (finder.IsDots())
continue; pIsoItem = NeroCreateIsoItem(); // will be freed by NeroFreeIsoItemTree
lstrcpyn( pIsoItem->fileName, finder.GetFileName(), 251 );
lstrcpyn( pIsoItem->sourceFilePath, finder.GetFilePath(), 251 );
pIsoItem->isDirectory=finder.IsDirectory();
pIsoItem->isReference=FALSE;
// collecting the items backwards was easier to code
pIsoItem->nextItem = pPreviousIsoItem;
pPreviousIsoItem = pIsoItem;
if ( finder.IsDirectory() )
pIsoItem->subDirFirstItem = NeroBuildIsoTreeFromPath( finder.GetFilePath() );
} finder.Close(); return pIsoItem;
}在刻录函数里面加上下面的代码:
niiTemp2=NeroCreateIsoItem(); //NERO_ISO_ITEM *niiTemp2;
if(SingleFile)//刻单个文件
{
strcpy(niiTemp2->fileName, mstrFileName);
strcpy(niiTemp2->sourceFilePath, mstrPathName);
niiTemp2->isDirectory=FALSE;
niiTemp2->isReference=FALSE;
niiTemp2->nextItem=NULL;
}
else//刻目录
niiTemp2 = NeroBuildIsoTreeFromPath((LPCTSTR)mstrPathName);