Old 19-11-2007   #1
New on Forum
 
Join Date: Nov 2007
Posts: 1
Determine if inserted media is CD or DVD

Hi.I searched all over for this...
How can I determine if it's a CD or a DVD that is inserted on the drive?
The CD/Dvd is already recorded.


I downloaded nero SDK, to give it a shot:
I tried NeroCom example which tells me that Media Type is unknown.

Then neroCMD:
NeroCMD --diskinfo --drivename

returns for a DVD+R:
Code:
unknown, not writable, 0 blocks free, finalized

Medium flags:
Layer 0 max blocks: 0
Total capacity:     2295104
Book type:          DVD-ROM

Track info:
  ### Type   Start      Stop       Length     Sess# ISRC
  ---+------+----------+----------+----------+-----+----
  01. data   0x00000000 0x0020924f 0x00209250     1
Ok.
For a CD:
Code:
unknown, not writable, 0 blocks free, finalized

Medium flags:
Layer 0 max blocks: 0
Total capacity:     178826
Book type:          unknown

Track info:
  ### Type   Start      Stop       Length     Sess# ISRC
  ---+------+----------+----------+----------+-----+----
  01. data   0x00000000 0x0002ba89 0x0002ba8a     1

How can I sucessfully determine if the media inserted on the drive is a CD/dvd+R/dvd-R/dvd-rw/dvd+rw??
I'm coding in VB.net but any language will do, if it can do this.
It can be using windows functions or in any other way...nero SDK seemed to be a solution but it isn't .
BirdOfPrey is offline   Reply With Quote
Old 22-11-2007   #2
New on Forum
 
Join Date: Oct 2007
Location: Karlsruhe, Germany
Posts: 4
Re: Determine if inserted media is CD or DVD

You could get this information with the NeroSDK.

Just use the function:
NERO_MEDIA_TYPE NeroGetCurrentMediumType(NERO_DEVICEHANDLE aDeviceHandle);

the input parameter is a device handle you obtain with
handle = NeroOpenDevice(g_pAktDeviceInfo);

The return value is the MediaType you are looking for. To convert the enum value to a string use:

char *NeroGetTypeNameOfMedia(NERO_MEDIA_SET media,void *reserved);

e.g. code snippet:
Quote:
handle = NeroOpenDevice(g_pAktDeviceInfo);
if(handle)
{
mediaTypeInRecorder = NeroGetCurrentMediumType(handle);
strTypeNAmeOfMedia = NeroGetTypeNameOfMedia(mediaTypeInRecorder, NULL);
if (strTypeNAmeOfMedia)
{
_tprintf(_T("TypeName of Media in Recorder: %s\n"), strTypeNAmeOfMedia);
}
}
ericgee is offline   Reply With Quote
Old 12-03-2008   #3
New on Forum
 
Join Date: Mar 2008
Posts: 4
Re: Determine if inserted media is CD or DVD

can one help to use java to write CD/DVD?
chilosak is offline   Reply With Quote
Reply


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
how to find Inserted Media is CD-R or CD-RW rajesri Nero & InCD 5 31-03-2008 04:31
How to determine origin of Sony DVD+R media? Jackie78 Blank Media 4 01-11-2007 11:56
Both DVD burners recognized as cd drives after blank media is inserted SudaWilde General Hardware Forum 2 21-06-2007 07:05
how can I determine the speed used to write on a dvd blank media. lucaiuli Newbie Forum 1 17-09-2004 18:03
DVD Media - How to determine good/bad scans? djhelpme Blank Media 5 23-10-2003 08:30


All times are GMT +2. The time now is 14:51.
Top