Windows XP problems

I was wondering if someone on these forums might be able to help me. I have been using the SDK under Windows 98 and 2000 for some months now and have had no problems. However, when I use it under XP my
programs always seem to crash. I downloaded the latest version of the SDK today and recompiled
my code using that but unfortunately the same problem occurs.
I am using Microsoft Visual C++ .Net and it always crashes after calling NeroBurn. The error
message is unhandled exception at 0x02b8a936 in Tecton Darlex_backup.exe: 0xC0000005:
Access violation reading location 0xcccccccc

Any help anyone can give on this would be appreciated,

It is hard to say more from the info you provided. Can you please run a debug build and look at the stack trace? This could reveal a lot more. If it does not help you, post more findings here.

Thank you for your reply, apologies for the delay in getting back to you, another major project was nearing completion at the same time as I was working on this and I had to switch my full attention to that.
I did run my program in debug mode but the stack trace just came out as nero.dll
the last command run was the burn function call that worked fine under 2000 and 98 but doesn’t seem to like XP.

It is quite strage… What is it that you are burning exactly? It is hard to get any ideas without the source code…

Thank you for your quick response.

The code is as follows (excuse the length but I thought it best to provide you with as much relevant code as possible):

int iRes = -1;
// set up structures for the playback files which need to be copied over
NERO_ISO_ITEM playback_dir;
NERO_ISO_ITEM autorun;
char *playback_filenames[NUM_PLAYBACK_FILES] = {“decoder.dll”, “Playback.exe”, “gdiplus.dll”, “config.ini”, “screen.ini”, “userfile.usr”};

// function to burn data to CD

// NOW setup file structure
strcpy(playback_dir.fileName, "playback");
playback_dir.isDirectory = TRUE;
playback_dir.isReference = FALSE;
playback_dir.nextItem = &autorun;
playback_dir.subDirFirstItem = &mniiFile;

// destination filename
strcpy(autorun.fileName, "autorun.inf"); 
// source filename
strcpy(autorun.sourceFilePath, ini_file.default_directory);
strcat(autorun.sourceFilePath, "\\playback\\");
strcat(autorun.sourceFilePath, "autorun.inf");
autorun.nextItem = NULL;

// destination filename
strcpy(mniiFile.fileName, "mainfile.xid"); 
// source filename
strcpy(mniiFile.sourceFilePath, filename);

// link to next file

	strcpy(playback_files[f].fileName, playback_filenames[f]);
	strcpy(playback_files[f].sourceFilePath, ini_file.default_directory);
	strcat(playback_files[f].sourceFilePath, "\\playback\\");
	strcat(playback_files[f].sourceFilePath, playback_filenames[f]);
		playback_files[f].nextItem = &playback_files[f+1];
		playback_files[f].nextItem = NULL;

// NOW setup CD
// no CD stamp, artist or title required
memset(&writeCD, 0, sizeof(writeCD));
// no CD Extra information available
// we have no Audio tracks
// we want to write to a CD
writeCD.nwcdMediaType = media_type;
writeCD.nwcdIsoTrack = 0;

// NOW try to open the selected device
// get the currently selected device from the ComboBox
int sel = CDOptions_dlg.m_devices.GetCurSel();
// retrieve the NERO_SCSI_DEVICE_INFO pointer for the selected device
// and assign it to a local variable

// CDOptions_dlg.m_devices is a simple windows list box which has the device info’s set as pointers to each item, I’ve check the result of this in my wathc window and it all makes sense.
NERO_SCSI_DEVICE_INFO* nsdiDevice = (NERO_SCSI_DEVICE_INFO*)CDOptions_dlg.m_devices.GetItemDataPtr(sel);
// try to open the selected device
ndhDeviceHandle = NeroOpenDevice(nsdiDevice);

// check whether a valid handle was returned
if (!ndhDeviceHandle)
	// no handle available; tell the user what happened
	AfxMessageBox("Device could not be opened", MB_OK);

writeCD.nwcdIsoTrack = NeroCreateIsoTrackEx(&playback_dir, “Company”, NCITEF_CREATE_ISO_FS|NCITEF_USE_JOLIET);

iRes = NeroBurn(ndhDeviceHandle, NERO_ISO_AUDIO_MEDIA, &writeCD, NBF_WRITE | NBF_BUF_UNDERRUN_PROT, 16, &npProgress);

You should really allocate NERO_ISO_ITEMs dynamically using NeroCreateIsoItem(), if using a recent NeroSDK. Nevertheless, things should work regardless of whether you use it or not but I must notice that you fail to initialize all NERO_ISO_ITEMs properly. When using NeroCreateIsoItem(), this is done for you, but as you are using static variables, you should at least memset them to 0, before using them any further. You probably compiled your original app with an older version of the SDK. Every new version tends to introduce new fields to structures and if they are not properly initialized, you could get a crash as you do. Zero is always a reasonable default and your structures have garbage in Release and 0xcccccccc in Debug builds.

As a first aid, try zero-ing out at least playback_files, playback_dir and autorun variables as well as any other not shown here.

Thanks for that AlexP that was exactly what I needed to do.
I added:
memset(&playback_dir, 0, sizeof(playback_dir));
memset(&autorun, 0, sizeof(autorun));
memset(&playback_files[f], 0, sizeof(playback_files[f]));

to my code and it all works fine now.

Many thanks,