How to use NeroCDInfo?

vbimport

#1

I want to get information about cd capacity and any other information about cd.
I understand that I should read that data from NeroCDInfo object which will be provided by the OnDoneCDInfo event when I calling CDInfo method, but I don’t know how to implement it. Can anybody show me how to implement it? (when I’m implementing it – OnDoneCDInfo event never occur)
I’m working with C# :confused:


#2

I found out that OnDoneCDInfo event occurs only after calling “BurnIsoAudioCD” method. What should I do to get information about CD before calling to “BurnIsoAudioCD” method (for example – I would like to know CD’s free space and it will help me to decide which file I’ll send to burn, big one or small one)


#3

The OnDoneCDInfo event occurs following a CDInfo call.

The BurnIsoAudioCD call is associated with the OnDoneBurn event.

Mike


#4

hi Mike

I’m working with C#. I’ll show you what i done:

private void GetCdInfo(NeroCDInfo cdInfo)
{
Console.WriteLine(" GetCdInfo ");
Console.WriteLine(cdInfo.UnusedBlocks);
}

private NeroDrive drive;
.
.
.
drive.OnDoneCDInfo += new _INeroDriveEvents_OnDoneCDInfoEventHandler(GetCdInfo);
.
.
drive.CDInfo(NERO_CDINFO_FLAGS.NERO_READ_CD_TEXT);
.
.
drive.BurnIsoAudioCD("", “”, false, isoTrack, null, null, NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_WRITE, 3, NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_CD);

I’m getting into GetCdInfo method not after “drive.CDInfo(…)” but after “drive.BurnIsoAudioCD(…)”.
but i want to get media’s info before activating “drive.BurnIsoAudioCD(…)” :confused:


#5

The events don’t fire imidietly.
What I do is i implement like this

while(boolOnDoneCDInfo==false)
{
application.doEvents(); // it forces evets to fire imidietly
thread.sleep(1000);
}

OnDoneCDInfo(…)
{
boolOnDoneCDInfo=true;
}


#6

cool "gapilazo "

I’m working in console application and i done

	while(!flag) // forcing event
	{
		Thread.Sleep(1000);
	}

“boolOnDoneCDInfo” is your boolean (not system’s), isn’t it?


#7

yes


#8

by the way, i saw that “NeroCDInfo” gives me information about unused blocks.

what is the block size in bytes? (to know what is the biggest file i can burn into media)


#9

block size depends on disktype

data cd -> 2048 Byte/block
audio cd -> 2352 Byte/block

(see also chapter 7.1.48 on page 72 in NeroAPI6.3.1.4.pdf)

Michael