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.