NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 86 87 88 89 90 … 93 Next »
eject a cd/dvd in C#

 
  • 0 Vote(s) - 0 Average
eject a cd/dvd in C#
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#1
2004-10-10, 09:21 AM
i just spent 2 hours searching google, and i cant seem to find a way to eject a cd/dvd drive in c#. anyone know how to do this?

i need to eject a dvd for the dvd copy method im writing for the moviedb plugin, it creates a dvd iso via dvddecrypter and then i need to eject the dvd and then wait for it to be closed again (i think i can do this with directory.exists method, not sure if it will work on a blank dvd thou) and then open up dvd decrypter again and write the dvd image.

i have to eject the dvd before i open up dvd decrypter again, because if you use the same drive, and a writable dvd isnt in the drive the program will just quit.

i know this isnt really gbpvr related (more C#) but i cant find the answer anywhere and was hoping someone might know.

cheers
amontillado
Offline

Junior Member

Posts: 21
Threads: 2
Joined: Jan 2004
#2
2004-10-10, 09:29 AM
You can probably do so by using the mciSendcommand function.

Look here for more info: http://msdn.microsoft.com/library....set.asp

I've used this succesfully in a delphi program, and it should also work for c#, but.. since i'm only a delphi programmer I can't guarantee it.
"All that we see or seem, is but a dream within a dream" E.A. Poe
Specs : XP1600, Asus A7N266VM/AA, 256mb, matrox 550 dh, samsung120gb, pvr 250 & 350, WinXp
Mijn PVR/HTPC website : http://www.cask-of-amontillado.com
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#3
2004-10-10, 10:09 AM
okay that confused me, still at uni so not the best programmer, hoping someone could give me a link to a few lines of code, or a few lines of code. i tried using the windowsmediaplayer thingy in .net, but threw an exception, ill look into that in more detail later, but if anyone knows the answer to my question and save me some time that would be very appreciated
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#4
2004-10-11, 05:08 PM
Here is a CD player app is C#. There is a eject function in there.

C# CD Player
-CodeMonkey
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode