NeroBurn() never stops on failuer

Hello every body;

i have made a C++ DLL that implement methods for CD burning, and to be called throw a Java program throw JNI
BUT, im facing now a disaster, which is; if the burn process is going correctlly, every thing 'll be ok
but if an error has been occured, the program stuck on NeroBurn() and never returns, and at this point if i insert an correct CD, without doing any thing in the program, the burning process starts by it self without my control

After reading forums and documentaions i’ve reached the following :

there are a variable that called mbaborted, which is should be true to stop the burining procces and force the neroburn method to return

now i need to know, where can i found that variable “mbaborted” to set it to true???

and if any one have another suitable solution, it’d be apreciated :flower:

the call back method that i have is as follows:

static BOOL NERO_CALLBACK_ATTR progress_callback(void *pUserData, DWORD dwProgressInPercent)
{
	DEBUG_PRINTF("Progress: %d%%
", dwProgressInPercent);


	progress = dwProgressInPercent;
	

	return TRUE;
}