MediaChanger.EjectDisc Method

Ejects the disk from the specified slot.

Syntax

public void EjectDisc(int slotAddress);

Parameters

slotAddress

System.Int32. Zero-based slot index from which to eject the disc.

Return Value

This method does not return a value.

Remarks

To disable the prompt that is displayed to the user when a disc is ejected, add the following registry key to your setup application:

Path: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings

Key: SuppressExtensibilityEjectPrompt

Value: 1

Note   If the SuppressExtensibilityEjectPrompt key is set to 0 or if the key does not exist, the user is prompted when an application calls the EjectDisc method. If the key exists and is set to any value other than 0, the prompt is disabled.

Requirements

Reference: Microsoft.MediaCenter

Namespace: Microsoft.MediaCenter

Assembly: Microsoft.MediaCenter.dll

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also