Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, Whats worng??? at International Chat: Software related forum; Hi, I try to burn a data cd since yesterday but I cant find whats worng. Can you halp me please. Everytime I call the NeroBurn command I got the Errorcode for NERAPI_BURN_FAILED. Here is a bit coding: Code:


Reply
 
Thread Tools
Old 27-03-2004   #1 (permalink)
New on Forum
 
Join Date: Mar 2004
Posts: 4
Whats worng???

Hi,

I try to burn a data cd since yesterday but I cant find whats worng. Can you halp me please. Everytime I call the NeroBurn command I got the Errorcode for NERAPI_BURN_FAILED.

Here is a bit coding:
Code:
	NERO_SCSI_DEVICE_INFOS *NeroDeviceInfos;
	NERO_SCSI_DEVICE_INFO *pSelectedDeviceInfo = NULL;
	NEROAPI_INIT_ERROR tInit;
	NERO_DEVICEHANDLE NeroDeviceHandle;
	void *pvIsoTrack = NULL;
	NERO_ISO_ITEM *pvIsoItem=NULL;
	NERO_WRITE_CD *ptNeroWriteCD = NULL;
	NEROAPI_BURN_ERROR tBurnError;
	NERO_PROGRESS tNeroProgress =
	{
		ProgressCallback,
		AbortedCallback,
		AddLogLine,
		SetPhaseCallback,
		NULL,
		DisableAbortCallback,
		SetMajorPhaseCallback
	};
	if (!NeroAPIGlueConnect(NULL)) 
	{
		return NERO_ERR_API_CONNECT;
	}
	tInit = NeroInit(&tNeroSettings, NULL);
	NeroDeviceInfos = NeroGetAvailableDrivesEx(MEDIA_CD, NULL);
	for (int i = 0; i < (int)NeroDeviceInfos->nsdisNumDevInfos; i++) 
	{ 
		if (!stricmp(pcBurnerName, NeroDeviceInfos->nsdisDevInfos[i].nsdiDeviceName))
		{
			NeroDeviceHandle = NeroOpenDevice(&((NeroDeviceInfos)->nsdisDevInfos[i]));
			pSelectedDeviceInfo=&NeroDeviceInfos->nsdisDevInfos[i];
			if (!NeroDeviceHandle) 
			{
				NeroFreeMem(NeroDeviceInfos);
				NeroAPIGlueDone();
				NeroDone();
				return NERO_ERR_DEV_NOT_FOUND;
			}
			break;
		}
	}
	pvIsoItem=NeroBuildIsoTreeFromPath( "C:\\test");// "*", FALSE);
	pvIsoTrack = NeroCreateIsoTrackEx(pvIsoItem,"Test",NCITEF_USE_JOLIET);
	ptNeroWriteCD  = (NERO_WRITE_CD *)malloc(sizeof(NERO_WRITE_CD));
	memset(ptNeroWriteCD, 0x0, sizeof(NERO_WRITE_CD));
	ptNeroWriteCD->nwcdArtist="";
	ptNeroWriteCD->nwcdTitle="";

	ptNeroWriteCD->nwcdIsoTrack=(CNeroIsoTrack*)pvIsoTrack;      /* if not NULL, then the disc will have an ISO track - please refer to "NeroIsoTrack.h" */
	ptNeroWriteCD->nwcdCDExtra=FALSE; 

	ptNeroWriteCD->nwcdpCDStamp=NULL;
	ptNeroWriteCD->nwcdNumTracks=1;

	ptNeroWriteCD->nwcdMediaType=MEDIA_CD;			/* Media on which the data should be written */

	tBurnError = NeroBurn(NeroDeviceHandle,
						  NERO_ISO_AUDIO_CD,
						  ptNeroWriteCD, // Must point on a NERO_WRITE_CD or a NERO_WRITE_VIDEO_CD structure
 						  NBF_SIMULATE
						  | NBF_CLOSE_SESSION
						  | NBF_DISABLE_EJECT,
						  pSelectedDeviceInfo->nsdiWriteSpeeds.nsiBaseSpeedKBs,				// In KB/s if NBF_SPEED_IN_KBS is present, in multiple of 150 KB/s otherwise
						  &tNeroProgress);
I'm appriciate for some help
Damion
Damion is offline   Reply With Quote
Old 29-03-2004   #2 (permalink)
New on Forum
 
Join Date: Feb 2004
Posts: 17
Re: Whats worng???

Hi Damion!

Quote:
Originally posted by Damion
I try to burn a data cd since yesterday but I cant find whats worng. Can you halp me please. Everytime I call the NeroBurn command I got the Errorcode for NERAPI_BURN_FAILED.
I have a similar problem (s. thread Initialization failure) and can give you a few hints to your code. Whether these will help you solving the NEROAP_BURN_FAILED, I don't know. Let us know, please.

It would also be of help, if you could tell the SDK and Nero version, you're using.

Quote:
Originally posted by Damion
Code:
  ...
  pvIsoItem=NeroBuildIsoTreeFromPath( "C:\\test");
  pvIsoTrack = NeroCreateIsoTrackEx(pvIsoItem,"Test",NCITEF_USE_JOLIET);
  ptNeroWriteCD  = (NERO_WRITE_CD *)malloc(sizeof(NERO_WRITE_CD));
  memset(ptNeroWriteCD, 0x0, sizeof(NERO_WRITE_CD));
  ...
  ptNeroWriteCD->nwcdNumTracks=1;
  ptNeroWriteCD->nwcdMediaType=MEDIA_CD; /* Media on which the data should be written */
  tBurnError = NeroBurn(NeroDeviceHandle,
      NERO_ISO_AUDIO_CD,
      ptNeroWriteCD,
      NBF_SIMULATE | NBF_CLOSE_SESSION | NBF_DISABLE_EJECT,
      pSelectedDeviceInfo->nsdiWriteSpeeds.nsiBaseSpeedKBs,
      &tNeroProgress);
Try to do some output of the generated ISOItemTree. Here's a function that might be of help
Code:
void CVideoArchivierung::DebugPrintIsoTree (const NERO_ISO_ITEM * pItem, int iLevel)
{
  while (pItem)
  {
    string indent(iLevel*2, ' ');

    // Indent each level a little bit.
    cout << indent << "fileName          : [" << pItem->fileName << "]" << endl;
    cout << indent << "longFileName      : [" << ((NULL == pItem->longFileName) ? "" : pItem->longFileName) << "]" << endl;
    cout << indent << "isDirectory       : " << (pItem->isDirectory ? "true" : "false" ) << endl;
    cout << indent << "isReference       : " << (pItem->isReference ? "true" : "false" ) << endl;
    cout << indent << "sourceFilePath    : [" << pItem->sourceFilePath << "]" << endl;
    cout << indent << "longSourceFilePath: [" << ((NULL == pItem->longSourceFilePath) ? "" : pItem->longSourceFilePath) << "]" << endl;
    cout << indent << "nextItem          : " << (long)pItem->nextItem << endl;
    cout << indent << "userData          : " << (long)pItem->userData << endl;
    cout << indent << "dataStartSec      : " << pItem->dataStartSec << endl;
    cout << indent << "dataLength        : " << (long)pItem->dataLength << endl;
    cout << indent << "itemSize          : " << pItem->itemSize << endl;
    cout << indent << "importInfo        : " << (long)pItem->importinfo << endl;

    // If it is a directory, show next level
    if (pItem->isDirectory)
    {
      DebugPrintIsoTree (pItem->subDirFirstItem, iLevel + 1);
    }

    pItem = pItem->nextItem;
  }
}
You set the nwcdNumTracks member of the ptNeroWriteCD structure to 1. I've learned that this member refers to audio tracks only. So, as long as you do not have any audio tracks, set it to 0 (or leave it untouched, as you filled the whole struct's memory area with 0).

Because there aren't any tracks, the size of the ptNeroWriteCD struct you allocate is too big. Try using this formula:
Code:
  iSize = sizeof(NERO_WRITE_CD) + (iNumTracks-1)*sizeof(NERO_AUDIO_TRACK);
The member nwcdMediaType of the ptNeroWriteCD struct is a very crucial one. Using MEDIA_CD seems to work in most cases. I have tried to use something like (DWORD)(MEDIA_CDRW|MEDIA_DVD_ANY) because my software should write to either of a CDRW or DVD burner, but that hadn't worked. You have to use the appropriate DWORD value matching the media exactly.

Try getting some more output after the NEROAPI_BURN_FAILED:
Code:
{
  char * NeroResult = NeroGetErrorLog();
  cout << "Nero error: <" << endl << NeroResult << endl << ">" << endl;
  NeroFreeMem(NeroResult);
}
Hope that helped a bit.

Regards,
Thorsten
Thorsten is offline   Reply With Quote
Old 29-03-2004   #3 (permalink)
New on Forum
 
Join Date: Mar 2004
Posts: 4
Hi,

yes this was my problem.

After I set the size to
sizeof(NERO_WRITE_CD) + (iNumTracks-1)*sizeof(NERO_AUDIO_TRACK);

and NumTracks to 0 I can burn
Thanks
Damion
Damion is offline   Reply With Quote
Old 11-07-2007   #4 (permalink)
New on Forum
 
Join Date: Jun 2007
Posts: 3
Re: Whats worng???

Hello, i read your code and test it but cant find any reference for this function
pvIsoItem=NeroBuildIsoTreeFromPath( "C:\\test");
Which version of neroapis are you using? i try the last that i find in nero web (V7.0.5.6).

Can you help me please?

Thank you
elfo.1975 is offline   Reply With Quote
 
Reply


If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here



Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What am i doing worng?? vortec327 Newbie Forum 26 01-06-2005 05:32
DVD Disc Printing-Printers&Media-WHATS HOT, WHATS NOT... DJMind CD & DVD Printing and Labeling 2 21-02-2005 11:00
whats better crash1972821 LiteOn / PLDS/ Sony Burner 1 23-05-2003 10:02
Whats the best way 2 The Man Copy Movie 1 27-03-2003 04:24
whats the best? Cypher007 LiteOn / PLDS/ Sony Burner 2 14-09-2002 17:14


All times are GMT +2. The time now is 17:49.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0