|
-
Jul 2nd, 2004, 10:37 AM
#1
Thread Starter
Lively Member
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.
-
Jul 2nd, 2004, 04:06 PM
#2
Addicted Member
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?
Last edited by Hole-In-One; Jul 2nd, 2004 at 04:09 PM.
-
Jul 3rd, 2004, 12:48 AM
#3
Thread Starter
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|