I ve got a problem

vbimport

#1

this is my method

void CNeroFiddelsDlg::OnBurn()
{
// TODO: Add your control notification handler code here
if(m_strFileName == “”)
{

	AppendString(" du musst einen File auswaehlen bevor du brennen kannst!");

}else
{
	strcopy(mniiFile.fileName, m_strFileName);
	strcopy(mniiFile.sourceFilePath, m_strPathName);
	mniiFile.isDirectory =FALSE;
	mniiFile.isReference =FALSE;
	mniiFile.nextItem =FALSE;
	writeCD.nwcdpCDStamp =NULL;
	writeCD.nwcdArtist =NULL;
	writeCD.nwcdTitle =NULL;
	writeCD.nwcdCDExtra =FALSE;
	writeCD.nwcdTracks =0;
	MediaType= Media_CD;
	int i= m_cbxDevice.GetCurSel();

	NERO_SCSI_DEVICE_INFO* msdiDevice=
		(NERO_SCSI_DEVICE_INFO*)m_cbxDevice.GetItemDataPtr(1);


ndhDeviceHandle = NeroOpenDevice(nsdiDevice);
if (!ndhDeviceHandle)
{
AppendString("Device could not be opened: "+(CString)nsdiDevice->nsdiDeviceName);
}
else
{
m_btnAbort.EnableWindow(true);
m_Cancel.EnableWindow(false);
m_Ok.EnableWindow(false);
m_cbxDevice.EnableWindow(false);
m_btnBrowse.EnableWindow(false);
m_btnBurn.EnableWindow(false);
m_pgsProgress.SetRange(0,100);
writeCD.nwcdIsoTrack = NeroCreateIsoTrackEx(&mniiFile,
"NeroFiddles", NCITEF_CREATE_ISO_FS|NCITEF_USE_JOLIET);
int iRes = NeroBurn(ndhDeviceHandle, NERO_ISO_AUDIO_CD, &writeCD,
NBF_WRITE, 0, &nsProgress);
NeroFreeIsoTrack(writeCD.nwcdIsoTrack);
NeroCloseDevice(ndhDeviceHandle);
m_btnAbort.EnableWindow(false);
m_Cancel.EnableWindow(true);
m_Ok.EnableWindow(true);
m_cbxDevice.EnableWindow(true);
m_btnBrowse.EnableWindow(true);
m_btnBurn.EnableWindow(true);
m_pgsProgress.SetPos(0);
mbAborted = false;
char* Log = NeroGetErrorLog();
AppendString(Log);
NeroFreeMem(Log);
switch(iRes)
{
case NEROAPI_BURN_OK:
AppendString ("BurnCD() : burn successful");
break;
case NEROAPI_BURN_UNKNOWN_CD_FORMAT:
AppendString ("BurnCD() : unknown CD format");
break;
case NEROAPI_BURN_INVALID_DRIVE:
AppendString ("BurnCD() : invalid drive");
break;
case NEROAPI_BURN_FAILED:
AppendString ("BurnCD() : burn failed");
break;
case NEROAPI_BURN_FUNCTION_NOT_ALLOWED:
AppendString ("BurnCD() : function not allowed");
break;
case NEROAPI_BURN_DRIVE_NOT_ALLOWED:
AppendString ("BurnCD() : drive not allowed");
break;
case NEROAPI_BURN_USER_ABORT:
AppendString ("BurnCD() : user aborted");
break;
case NEROAPI_BURN_BAD_MESSAGE_FILE:
AppendString ("BurnCD() : bad message file");
break;
default:
AppendString ("BurnCD() : unknown error");
break;

}
}
}
}

here are the errors

G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(205) : error C2065: ‘AppendString’ : undeclared identifier
G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(209) : error C2065: ‘strcopy’ : undeclared identifier
G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(218) : error C2440: ‘=’ : cannot convert from ‘const int’ to ‘struct tag_NERO_AUDIO_TRACK [1]’
There are no conversions to array types, although there are conversions to references or pointers to arrays
G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(219) : error C2065: ‘MediaType’ : undeclared identifier
G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(219) : error C2065: ‘Media_CD’ : undeclared identifier
G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(226) : error C2065: ‘nsdiDevice’ : undeclared identifier
G:\MY_PRJECTZ\NeroFiddels\NeroFiddelsDlg.cpp(229) : error C2227: left of ‘->nsdiDeviceName’ must point to class/struct/union
Error executing cl.exe.


#2

Are you including the correct header files?


#3

This seems to be a portion of the modified neroFiddles sample application from the NeroSDK. Originally, AppendString is part of the CNeroFiddelsDlg class and if the compiler cannot find it, you must have removed or renamed it. strcopy looks like a typo as this function does not exist in the C run-time library. If this is a new function defined by you, you should tell the compiler where to find the function declaration.

All of these errors seem to be pretty easy to resolve even for a beginner C++ programmer.