-
Eject a CD in VB.NET
Is there any way to eject a cd through the .net framework?
I have been using the mcisendmessage api and I know there HAS to be a way to do it.
Right now to detect if there is no cd in the drive i'm using a thread with a loop like this
Code:
While Not Directory.Exists(cdDrive)
' Do Nothing
Application.DoEvents
End While
When the CD is inserted it exits that thread. After my program does what it needs, I want to eject the cd.
-
Heres a link for it:
The Code Project
It will work using reference to his dll.
By the way whats wrong with using the API call?
-
Quote:
Originally posted by Hole-In-One
Heres a link for it:
The Code Project
It will work using reference to his dll.
By the way whats wrong with using the API call?
That project uses the MciSendString command too. Theres nothing wrong with it but I would think that they would have other methods in the new framework. There is a XP CD burning source code also, I am not good enough with C# to follow exactly where it goes, but it does have an eject method.
Thanks