Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Audio


Commercial message

Audio In the audio forum you can discuss things like streaming audio, the best audio speaker, gets tips for your car audio and how to read an audio book



Reply
 
Thread Tools
Old 23-07-2004   #1 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 9
Problem in using BurnFreestyleCD() for burning data CD

Hi,

I am using NERO 6.3 version. I am using VC++ as the client to communicate with NEROCOM. I was able to burn Audio CD. but I am facing problem for data CD. I am using BurnFreestyleCD () to make a Data CD. Here are the log messages.....

Reading Directories
Creating Directories
Checking Discs
Writing to cache
caching of files started
caching of files completed
writing to Disc
Burn progress started @ 4x 600 kb/s
Writing tracks
Writing Lead in and Lead out
Write Error
could not perform End track



I came to know that "Write Error" is posted if there is a media mismatch. but i am able to make a data CD using Nero Application( which is provided when we buy the software). So I feel that there is some other problem...Please see the piece of Code and let me know where I am going wrong...


HRESULT CEngineIntFace::Burn_Data()
{

HRESULT hr;
INeroFreestyleTrack *IFreeTrack;
INeroFreestyleTracks *IFreeTrks;
INeroFileSystemDescContainer *IFileDescCont;

INeroFiles *Ifls;
BSTR bstrname=SysAllocString(L"asd");
long res;
long speed;
CString sDriveName;
long val;

// Getting the Drives....has to be removed later coz we have already have GetDrives()
// if(SUCCEEDED(hr))
{
// BSTR ArtistName;
BSTR FileName = SysAllocString(OLESTR("E:\\xx.MP3"));
hr = INero->GetDrives(NERO_MEDIA_CDR,&Idrives);
Idrives->get_Count(&res);

for(int i=0;i<res-1;i++)
{
Idrives->Item(i,&Idrv);
Idrv->get_DeviceName(&bstrname);
//
Idrv->get_AvailableSpeeds(NERO_ACCESSTYPE_READ,NERO_MEDIA_CDRW,&Ispeeds);

Idrv->get_ReadSpeeds(&Ispeeds);
Ispeeds->get_Count(&val);
Ispeeds->get_BaseSpeedKBs(&speed);

sDriveName=(CString)bstrname;

}

// For Burning

hr = CoCreateInstance( CLSID_NeroFolder, NULL, CLSCTX_INPROC_SERVER,
IID_INeroFolder, (void**) &Ifold);

if(!SUCCEEDED(hr))
{
return hr;
}

hr = CoCreateInstance( CLSID_NeroISOTrack, NULL, CLSCTX_INPROC_SERVER,
IID_INeroISOTrack, (void**) &Itrk);

hr = CoCreateInstance( CLSID_NeroFreestyleTrack,NULL,CLSCTX_INPROC_SERVER,
IID_INeroFreestyleTrack, (void**) &IFreeTrack);

hr = CoCreateInstance( CLSID_NeroFileSystemDescContainer,NULL,CLSCTX_INPROC_SERVER,
IID_INeroFileSystemDescContainer, (void**) &IFileDescCont);

hr = CoCreateInstance( CLSID_NeroFreestyleTracks,NULL,CLSCTX_INPROC_SERVER,
IID_INeroFreestyleTracks, (void**) &IFreeTrks);

if(!SUCCEEDED(hr))
{
// return hr;
}


hr = CoCreateInstance( CLSID_NeroFile, NULL, CLSCTX_INPROC_SERVER,
IID_INeroFile, (void**) &Ifile);


if(SUCCEEDED(hr))
{
IFileDescCont->put_BurnOptions(NERO_BURN_OPTION_USE_JOLIET);
IFreeTrack->put_Title(L"DataCD");
IFreeTrack->put_Artist(L"Ashok");
IFreeTrack->put_TrackType(NERO_FREESTYLE_TRACK_MODE1);
IFreeTrks->Add(IFreeTrack);
IFreeTrack->put_Filename(L"E:\\xx.txt");

Ifile->put_SourceFilePath(L"E:\\xx.txt");
Ifile->put_Name(L"xx.txt");

hr = Itrk->put_Name(L"TestTrack");
Itrk->put_RootFolder(Ifold);

Ifold->get_Files(&Ifls);
Ifls->Add(Ifile);
Ifls->get_Count(&res);


pSink = new CSinkNeroDriveEvents();

if ( NULL == pSink )
{
return 0 ;
}

pSink->AdviseSink(Idrv);

hr = Idrv->BurnFreestyleCD(IFileDescCont,L"Pop Star",L"Title",0,Itrk,IFreeTrks,NULL,NERO_BURN_FLAG_WRITE,8,NERO_MEDIA_CD);
Sleep(2000);

// m_INero->get_ErrorLog(&bstrname);
// CString ash = (CString)bstrname;

Ifold->Release();
Ifile->Release();
Itrk->Release();

}
}


return S_OK;

}

thanx in advance,
ARaj
ashokr is offline   Reply With Quote
Reply

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 Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
nero7express cd data burning problem in LG GSA-H44N. nenu Burning Software 1 21-08-2007 22:50
Need help with minor data burning problem lyons General Software 0 27-03-2007 15:44
Need recommendation: Drive for DL backups, CD ripping, and CD-R data burning nstenz CD and DVD Burners 7 22-09-2006 20:50
Problem Burning 4.7 GB of data pakun01 Nero & InCD 2 03-10-2005 21:37
BurnFreestyleCD( ) is not working ashokr Nero SDK Discussion Forum 3 24-07-2004 12:41


All times are GMT +2. The time now is 15:37.


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