detecting dvd drive in C++

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

detecting dvd drive in C++

Postby hairymunky » Tue May 17, 2005 7:44 pm

Hi all,
Anybody know how to (auto)detect a machines dvd-row/writer in c++ (or c), and also how to mount, unmount and eject the drive once its detected...?

(ie my machine the DVDr is /media/cdrecorder (although its a dvd-writer) and it
is on /dev/hdd) . This information would be sent to a list box in my KDE app.

tia
Graham
Linux powered Astronomy
User avatar
hairymunky
 
Posts: 59
Joined: Sun Apr 17, 2005 5:50 pm

Postby hairymunky » Sun May 29, 2005 3:45 pm

done it :)

although it's a bit of a hack just now, Im using "/dev/dvd" for my device and all is fine,
for the meantime :)
Linux powered Astronomy
User avatar
hairymunky
 
Posts: 59
Joined: Sun Apr 17, 2005 5:50 pm

Postby wiz » Sun May 29, 2005 7:36 pm

Yes,yes,yes! But how did you do it?
wiz
LXF regular
 
Posts: 119
Joined: Thu Apr 07, 2005 6:20 pm
Location: In front of a computer

Postby hairymunky » Wed Jun 15, 2005 7:20 am

Using dvdread library and passing in "/dev/dvd" as the device :)
Linux powered Astronomy
User avatar
hairymunky
 
Posts: 59
Joined: Sun Apr 17, 2005 5:50 pm

Postby wiz » Wed Jun 15, 2005 4:34 pm

Thanks.. I think :?
wiz
LXF regular
 
Posts: 119
Joined: Thu Apr 07, 2005 6:20 pm
Location: In front of a computer


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest