Annoying SDK Assertion problem



I’ve downloaded the SDK and loaded up the samples that comes with the SDK. I’ve altered the types of files it should filter (instead of MP3’s, its now M$ Doc’s). However, when I load the Doc file path, and press the ‘Burn’ button, an Assertion error is displayed when I try and execute the following :

int iRes = NeroBurn(ndhDeviceHandle, NERO_ISO_AUDIO_CD, &writeCD, NBF_SIMULATE, 0, &npProgress);

Everything upto this point works fine, I have the correct data, drive, file, etc etc.

For clarification purposes, I have the following:

		m_niiFile.longFileName = m_strFilename.GetBuffer(m_strFilename.GetLength());
		m_niiFile.longSourceFilePath = m_strPathName.GetBuffer(m_strPathName.GetLength());;
		m_WriteCD.nwcdMediaType = MEDIA_CD;

This problem also occurs for MP3 files too. In other words, I cannot burn ANY CD’s using the example that comes with the SDK! :frowning:

Anyone have any ideas??

Kind regards



The examples work fine for me.
What’s the exact assertion output? Is it really an assertion, or do you mean an exception?


Hi Oliver,
It is an assertion and not exception.

I’ve managed to track down the problem, though. The SDK examples, as it stands, are missing some initialisation calls for the NERO_PROGRESS and NERO_ISO_ITEM structures.

I needed to do the following for it to work :

	NERO_WRITE_CD				m_WriteCD;
	NERO_ISO_ITEM				m_niiFile;

	ZeroMemory(&m_npProgress, sizeof(m_npProgress));
	ZeroMemory(&m_niiFile, sizeof(m_niiFile));

This initialisation code is missing from the SDK.

Its a point worth noting, I have no idea as to why, but the examples on my home PC works fine without any initialisation issues. But at work they don’t, even though both platforms are exactly identical!! :confused:




Do you create the NERO_ISO_ITEM structure with NeroCreateIsoItem() and the NERO_PROGRESS with NeroCreateProgress()?

If so, the structures should be correctly zeroized and initialized (structure size member is set), at least this is the case in my code.

Ensure if you zeroize the structures yourself to correctly set the size members.