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


Commercial message



Nero SDK Discussion Forum Discuss, NeroEstimateTrackSize crashes at International Chat: Software related forum; Hi, I want to estimate the size of the isoTrack I will burn to test if the space on the CD is sufficient or not... I have problem wit the function NeroEstimateTrackSize that crashes Her is my code : Please could you tell what do I wrong.. ? Code:


Reply
 
Thread Tools
Old 17-06-2005   #1 (permalink)
New on Forum
 
Join Date: Apr 2005
Posts: 11
NeroEstimateTrackSize crashes

Hi,

I want to estimate the size of the isoTrack I will burn to test if the space on the CD is sufficient or not...
I have problem wit the function NeroEstimateTrackSize that crashes
Her is my code :
Please could you tell what do I wrong.. ?

Code:
NERO_FILESYSTEMTRACK_OPTIONS pTrackOptions;
memset(&pTrackOptions, 0, sizeof(NERO_FILESYSTEMTRACK_OPTIONS));
pTrackOptions.netsStructureSize =sizeof (NERO_FILESYSTEMTRACK_OPTIONS);
pTrackOptions.netspCDStamp = NULL;
pTrackOptions.netsMediaType = MEDIA_CD;
pTrackOptions.netsDeviceHandle = m_NeroDeviceHandle;
pTrackOptions.netsFlags = NBF_WRITE | NBF_DISABLE_ABORT | NBF_BUF_UNDERRUN_PROT | NBF_DETECT_NON_EMPTY_CDRW | NBF_CD_TEXT | NBF_VERIFY;;
pTrackOptions.netsFSContainer = NULL;
pTrackOptions.netsFSContainerFlags = 0;



int v_NecessarySize = 0;
try{
    v_NecessarySize = NeroEstimateTrackSize(m_IsoTrack,NETS_EXACT_SIZE,&pTrackOptions);
}catch(...){
    char * NeroResult = NeroGetErrorLog();
    sprintf(vMsg,"%s \n  Nero error: <%s>",vMsg,NeroResult);
    NeroFreeMem(NeroResult);
    SetBurnStatus(vMsg);
    return ESTIM_TRACK_SIZE_ERROR;
}
The error is : Access violation ntdll.dll. I suppose that my object pTrackOption is not corredtly initialized.... but what is wrong ?

Thanks in advance for your help

Fpa2
fpa2 is offline   Reply With Quote
Old 17-06-2005   #2 (permalink)
CD Freaks Member
 
Join Date: Mar 2005
Posts: 109
Re: NeroEstimateTrackSize crashes

Just a wild guess: Is the ISO track and all items + referenced strings in the ISO track valid? Is the code located right before NeroBurn, which would succeed if you omitted the NeroEstimateTrackSize?

And a sidenote: NeroEstimateTrackSize returns an unsigned int.
Oliver M. is offline   Reply With Quote
Old 17-06-2005   #3 (permalink)
CD Freaks Member
 
Join Date: Mar 2005
Posts: 109
Re: NeroEstimateTrackSize crashes

PS: The posted code snipped works for me, so the bug must be located somewhere else.
Oliver M. is offline   Reply With Quote
Old 17-06-2005   #4 (permalink)
New on Forum
 
Join Date: Apr 2005
Posts: 11
Re: NeroEstimateTrackSize crashes

Hi Oliver,

The code posted has been taken from this forum and the person who posted this code said it was working...
But, my program works fine if I do not estimate the size...
I can burn in multisession with my NeroIsoTrack....

Strange isn't it ?

Fpa2
fpa2 is offline   Reply With Quote
Old 17-06-2005   #5 (permalink)
CD Freaks Member
 
Join Date: Mar 2005
Posts: 109
Re: NeroEstimateTrackSize crashes

Really, it is.
Please double-check it: Have you really placed the code directly before the NeroBurn command, just to be on the safe side?
Are you really using the correct variables?
Oliver M. is offline   Reply With Quote
Old 17-06-2005   #6 (permalink)
New on Forum
 
Join Date: Apr 2005
Posts: 11
Re: NeroEstimateTrackSize crashes

Oliver,

Sorry, you're totally right!
This is not the function that is in cause....
If I delete its call, the programm crashes again....

It is crashing when I call NeroBurn, and the thing i don't understand is that the error is done on the Callback, on the first line! (creation on a CString!)
Code:
void NERO_CALLBACK_ATTR CTestNeroAPI_InterfaceDlg::SetPhaseCallback(void *pUserData, const char *text)
{
  // display the current phase the burn process is currently going through
  CString csTemp(text);
  ((CTestNeroAPI_InterfaceDlg*)pUserData)->AppendString("Phase: " + csTemp);
  return;
}
Do you have an idea of the origin of this error.. ?
If needed, I can put my code in attach....

thanks for your help

Fpa2
fpa2 is offline   Reply With Quote
Old 17-06-2005   #7 (permalink)
CD Freaks Member
 
Join Date: Mar 2005
Posts: 109
Re: NeroEstimateTrackSize crashes

Can you put a breakpoint on CString csTemp(text); and see
(a) where text is pointing to and
(b) whether the memory text is pointing to contains considerably valid string data
(c) whether the string data is correctly null-terminated (ANSI->1 byte)

[Edit]
I just peeked into my code: For whatever reason, I check the passed string pointer against NULL. Maybe it was just defensive programming...
Oliver M. 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 On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade Crashes ronate12 DVDFab / DVD Region+CSS Free 9 13-12-2006 16:28
Nero 7 Crashes pillainp Nero & InCD 4 29-01-2006 16:52
NeroEstimateTrackSize() sajith Nero SDK Discussion Forum 0 03-09-2004 13:53
NeroEstimateTrackSize() always returns -1 codekiddie Nero SDK Discussion Forum 3 10-08-2004 19:36


All times are GMT +2. The time now is 20:32.


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