Share via


Windows Media Player 11 SDK Cdrom.eject 

Windows Media Player SDK banner art

Previous Next

Cdrom.eject

The eject method ejects the CD or DVD from the drive.

Syntax

  

Parameters

This method takes no parameters.

Return Values

This method does not return a value.

Remarks

If the drive door is open, this method closes the door.

To use this method, read access to the library is required. For more information, see Library Access.

Windows Media Player 10 Mobile: This method is not supported.

Example Code

The following example creates an HTML button element that uses Cdrom.eject to open the door of the drive that has drive specifier index zero. The Player object was created with ID = "Player".

  

Requirements

Version: Windows Media Player version 7.0 or later.

Library: Use wmp.dll.

Platform: Windows XP or later for DVD.

See Also

Previous Next