| |||||||
| Commercial message | |
| | |
|
![]() |
| | Thread Tools |
| | #1 (permalink) |
| New on Forum Join Date: Jun 2005
Posts: 7
| Burning more than one file at a time. I have two questions really : 1) How do I copy more than one file at a time to CD? I have looked on the following link : Chaining and the following is what I've come up with: Code: CreateTree(const CList Type type definitions for m_niiFile and m_RootItem is NERO_ISO_ITEM*. One can assume that listOfFiles contains the number of files and are correct as I've checked. The following is my calls before I call NeroBurn : Code: m_WriteCD.nwcdIsoTrack = NeroCreateIsoTrackEx(m_RootItem,"Data Backup", NCITEF_CREATE_ISO_FS|NCITEF_USE_JOLIET);
int iRes = 0;
AfxMessageBox("Starting Burn\n");
iRes = NeroBurn(m_ndhDeviceHandle, NERO_ISO_AUDIO_CD, &m_WriteCD,NBF_WRITE|NBF_DETECT_NON_EMPTY_CDRW, 0, &m_npProgress); ![]() Kind regards John |
| | |
| | #2 (permalink) |
| New on Forum Join Date: Jun 2005
Posts: 7
| Re: Burning more than one file at a time. Please find below the revised code as the previous code was incorrect : Code: CreateTree(const CList I have no idea why this is so can someone point me in the right direction? Kind regards John |
| | |
| | #3 (permalink) | |
| CD Freaks Member Join Date: Mar 2005
Posts: 109
| Re: Burning more than one file at a time. Hi John What I did find in your code at a first glance: 1) As far as I interpret the Nero SDK documentation, m_niiFile[nCount]->longFileName should contain the file name, not the whole file path. Even if your solution works, it might not be compatible with future versions. 2) The following line will appear funny to you once you think about it once again: Code: m_niiFile[nCount]->nextItem=m_niiFile[nCount+1]; ![]() Edit: And what I just saw as of the writing of (5): ->nextItem should point to an item, not assign an item. Did this code really compile fine? 3) The long source file path is of type "const char *", so you do not need to provide a "char*". Just assign static_cast 4) *BUT* if you reread the documentation of CString::GetBuffer(), you'll see that this approach is most likely not working at all: Quote:
I just wonder why you didn't get an access violation or similar on NeroCreateIsoTrackEx... 5) One more thing: Did I saw the dereferencing operator in this line? Code: m_niiFile[nCount] = *NeroCreateIsoItem(); | |
| | |
| | #4 (permalink) | ||||
| New on Forum Join Date: Jun 2005
Posts: 7
| Re: Burning more than one file at a time. Thanx for your reply oliver. Quote:
Code: CString* strPathname = new CString(listOfFiles.GetNext(pos)); // pathname + filename
CString* strFilename = new CString(strPathname->Right(strPathname->GetLength() - strPathname->ReverseFind('\\')-1)); // just the filename Quote:
Code: for (int nElement = 0; nElement < nCount; nElement++)
{
m_niiFile[nElement].nextItem = &m_niiFile[nElement+1];
} Quote:
Quote:
Code: m_niiFile = new NERO_ISO_ITEM[listOfFiles.GetCount()]; Code: m_niiFile[nCount] = NeroCreateIsoItem(); // compiler error Code: m_niiFile[nCount] = *NeroCreateIsoItem(); // causes memory leaks Any further ideas? I've viewed your code : Nero API Example, but your example only creates NERO_ISO_ITEM's on the stack, and not the heap. Does the Nero API ensure that NERO_ISO_ITEM can only be created on the stack? Regards John | ||||
| | |
| | #5 (permalink) |
| CD Freaks Member Join Date: Mar 2005
Posts: 109
| Re: Burning more than one file at a time. The Nero API provides methods for creation and destruction of NERO_ISO_ITEMs. We cannot tell where and how the Nero API allocates memory for the items, and we do not have to mess up with it. Any other usage, even if it works fine at the moment on your computer with your Nero installation, is not guaranteed to be compatible. Note that file system delimiter may also be a forward slash (you are looking for a backslash only). You can create m_niiFile[] as an static array or dynamic array (or whatever container), but you should use an container of pointers instead of objects, e.g. Code: // Create a static array of 200 NERO_ISO_ITEM pointers. NERO_ISO_ITEM *m_niiFile[200]; memset(m_niiFile, 0, sizeof(m_niiFile)); // Assign an item to the array. m_niiFile[0] = NeroCreateIsoItem(); assert(m_niiFile[0]); // Delete the created NERO_ISO_ITEM. NeroFreeIsoItem(m_niiFile[0]); m_niiFile[0] = NULL; Code: // Create a dynamically sized array of 200 NERO_ISO_ITEM pointers. NERO_ISO_ITEM ** prgpItem = new NERO_ISO_ITEM*[200]; memset(prgpItem, 0, sizeof(*prgpItem)*200); // Assign an item to the array. prgpItem[0] = NeroCreateIsoItem(); assert(prgpItem[0]); // Delete the created NERO_ISO_ITEM. NeroFreeIsoItem(prgpItem[0]); prgpItem[0] = NULL; // Delete the dynamically sized array. delete [] prgpItem; Code: // Create a vector of NERO_ISO_ITEMs.
std::vector<NERO_ISO_ITEMS*> vecItems;
// Create a new ISO item and push it to the vector.
vecItems.push_back(NeroCreateIsoItem());
// Access the last added ISO item.
vecItems.back().longFileName = "foo";
// Delete all created ISO items.
for (std::vector<NERO_ISO_ITEMS*>::iterator it = vecItems.begin(); it != vecItems.end(); ++it)
{
NeroFreeIsoItem(*it);
*it = NULL;
} |
| | |
| | #9 (permalink) |
| New on Forum Join Date: Jul 2005
Posts: 1
| Re: Burning more than one file at a time. hi, i am using nero for the past 3 years and it is really fantastic the problem am facing now is that i have some ISOs for games on my PC where some files (normally .cab) are 1.8 or even 2.5 gegas. is there a way that i can put these on a cd, or even split them on 2 or more cds? please note that i am not specilaist so if you please use simple language |
| | |
| |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem burning dvd, buffer level changing and burning takes long time | chandlertigger | Burning Software | 18 | 18-06-2008 23:43 |
| File verification takes time | arian_rishi | CD and DVD Burners | 1 | 11-08-2007 17:38 |
| CUE file time problem | rendez2k | Audio | 4 | 07-11-2004 23:03 |
| set file date & time | the_sz | Nero SDK Discussion Forum | 0 | 12-01-2004 14:33 |
| file time is burn time and not original time | the_sz | Nero SDK Discussion Forum | 0 | 05-01-2004 21:42 |