From: Allan M. Bruce on
Can anybody tell me how to eject a CD programmatically? I found
EjectDiskFromSADrive but it appears to be only for Windows Sever 2003.

Thanks
Allan


From: Alex Fedotov on
Allan M. Bruce wrote:

> Can anybody tell me how to eject a CD programmatically? I found
> EjectDiskFromSADrive but it appears to be only for Windows Sever 2003.

http://www.google.com/search?hl=en&lr=&q=IOCTL_STORAGE_EJECT_MEDIA

-- Alex Fedotov


From: Jerry Coffin on
In article <DJSdnc9PUOdr-0_ZRVnytw(a)pipex.net>,
allanmb(a)TAKEAWAYdsl.pipex.com says...
> Can anybody tell me how to eject a CD programmatically? I found
> EjectDiskFromSADrive but it appears to be only for Windows Sever 2003.

Here's one way:

void openCD() {
if(mciSendString("open cdaudio",NULL,0,NULL)==0) {
mciSendString("set cdaudio door open",NULL,0,NULL);
mciSendString("close cdaudio",NULL,0,NULL);
}
}

--
Later,
Jerry.

The universe is a figment of its own imagination.
 | 
Pages: 1
Prev: DIB to HBITMAP - goes black
Next: VS2005 and NT4