Microsoft DirectX 8.0

MSDVDAdm Object

The methods and properties of the MSDVDAdm "administration" object enable a scripting application to modify its default settings in the Microsoft® Windows® registry. The registry is a database on all Windows systems where applications can store information about themselves to be used on initialization or during run time.

Most of these methods and properties do not set or retrieve the current values in the MSWebDVD object itself. This means, for example, that when you call GetParentalLevel the returned value is not the current parental level stored in the object. Rather, it is the default parental level stored in the registry. To get the current parental level, call the MSWebDVD method GetPlayerParentalLevel. Calling SaveParentalLevel simply writes a new default parental access level to the registry; you still need to call the MSWebDVD method SelectParentalLevel to make the change take effect immediately in the MSWebDVD object. The default locale identifier (LCID) methods work in a similar way.

On the other hand, the BookmarkOnStop and BookmarkOnClose methods take effect immediately because the MSWebDVD object checks these settings just before the user stops playback or closes the application, rather than during initialization.

You access the MSDVDAdm object through the DVDAdm property of MSWebDVD. So, for example, if the MSWebDVD object is named "DVD," call ChangePassword as shown in the following code example.

DVD.DVDAdm.ChangePassword(sUserName, sOld, sNew);

Methods and Properties

The following table lists the methods and properties exposed by the MSDVDAdm object.
Methods
ChangePasswordSaves a new application password in the registry.
SaveParentalLevelSaves a new default parental level to the registry.
SaveParentalCountrySaves the application's new parental country to the registry.
ConfirmPasswordTests whether the specified password matches the previously saved password.
GetParentalLevelRetrieves the parental level that was last saved to the registry.
GetParentalCountryRetrieves the parental country that was last saved to the registry.
RestoreScreenSaverRestores the system screen saver settings.
Properties
DisableScreenSaverTurns the system screen saver on or off.
DefaultAudioLCIDSets or retrieves the registry setting for the user-specified default LCID for the audio stream.
DefaultSubpictureLCIDSets or retrieves the registry setting for the user-specified default LCID for the subpicture stream.
DefaultMenuLCIDSets or retrieves the registry setting for the user-specified default LCID for menus.
BookmarkOnStopSets or retrieves a value that tells the MSDVDAdm object whether to automatically save a bookmark of the current location and settings when the user clicks the Stop button.
BookmarkOnCloseSets or retrieves a value that tells the MSDVDAdm object whether to automatically save a bookmark of the current location and settings when the user closes the application.

BookmarkOnClose Property

MSDVDAdm Object

Sets or retrieves a value that tells the MSDVDAdm object whether to automatically save a bookmark of the current location and settings when the user closes the application.

Syntax

[ bBookmarkOnClose = ] DVD.DVDAdm.BookmarkOnClose

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmMSWebDVD object's DVDAdm property.
bBookmarkOnClose Boolean value that indicates whether the MSDVDAdm control will save a bookmark of all DVD settings including position on disc, parental level, and parental country when the user closes the DVD player application.

Remarks

This property is read/write with a default value of true.

See Also

BookmarkOnStop, Saving and Restoring Bookmarks

BookmarkOnStop Property

MSDVDAdm Object

Sets or retrieves a value that tells the MSWebDVD object whether to automatically save a bookmark of the current location and settings when the user clicks the Stop button.

Syntax

[ bBookmarkOnStop = ] DVD.DVDAdm.BookmarkOnStop

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmMSWebDVD object's DVDAdm property.
bBookmarkOnStopBoolean value indicating whether the MSDVDAdm object will save a bookmark of all DVD settings including position on disc, parental level and parental country.

Remarks

This property is read/write with a default value of false.

Bookmarks are valid only for a particular machine. A user cannot save a bookmark and then send it to someone else to read on a different machine.

See Also

BookmarkOnClose

ChangePassword Method

MSDVDAdm Object

Saves a new application password in the registry.

Syntax

DVD.DVDAdm.ChangePassword(sUserName, sOld, sNew );

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
sUserName String value specifying the current user's logon name. The MSDVDAdm object ignores this parameter. See Remarks.
sOld String value specifying the user's old password.
sNew String value specifying the user's new password. Cannot be NULL.

Return value

No return value.

Remarks

Currently, the sUserName parameter is ignored on this and all related methods. This means that whoever knows the password can set the parental level. There is only one password and one parental level for the application. There is no support for individual user logon names or multiple password management. To enforce parental management levels, parents should set the password and then set the parental level appropriate for younger members of the family. When parents want to view a disc with adult-rated content, they can change the level, and then change it back when they are done viewing. As long as the children do not know the password, they can only watch content at or below the level set for them.

See Also

ConfirmPassword

ConfirmPassword Method

MSDVDAdm Object

Tests whether the specified password matches the previously saved password.

Syntax

[ bIsConfirmed = ] DVD.DVDAdm.ConfirmPassword(sUserName, sPassword);

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
sUserName String value specifying the user's name. See Remarks.
sPassword String value specifying the new password.

Return value

Returns true if the specified password matches the existing password, false otherwise.

Remarks

Currently, the sUserName parameter is ignored on this and all related methods.

See Also

ChangePassword

DefaultAudioLCID Property

MSDVDAdm Object

Sets or retrieves the registry setting for the user-specified default LCID for the audio stream.

Syntax

[ iAudioLCID = ] DVD.DVDAdm.DefaultAudioLCID

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
iAudioLCID Integer value representing the user-specified default audio LCID as stored in the registry settings for the DVD application. This value is not necessarily the same as the default audio stream as authored on the DVD. For the range of valid LCIDs, see the Microsoft® Win32® documentation in the Platform SDK.

This property is read/write with no default value. If no default audio LCID is specified, the MSDVDAdm object will play the audio stream that is marked as the default stream on the disc.

DefaultMenuLCID Property

MSDVDAdm Object

Sets or retrieves the registry setting for the user-specified default LCID for menus.

Syntax

[ iMenuLCID = ] DVD.DVDAdm.DefaultMenuLCID

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
iMenuLCID Integer value representing the LCID as stored in the registry settings for the DVD application. This value is not necessarily the same as the default menu language as authored on the DVD. For the range of valid LCIDs, see the Win32 documentation in the Platform SDK.

This property is read/write with no default value. If no default menu LCID is specified, the MSDVDAdm object will use the language that is marked as the default menu language on the disc.

DefaultSubpictureLCID Property

MSDVDAdm Object

Sets or retrieves the registry setting for the user-specified default LCID for the subpicture stream.

Syntax

[ iSubpictureLCID = ] DVD.DVDAdm.DefaultSubpictureLCID

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
iSubpictureLCID Integer value representing the user-specified default subpicture LCID as stored in the registry settings for the DVD application. This value is not necessarily the same as the default subpicture stream as authored on the DVD. For the range of valid LCIDs, see the Win32 documentation in the Platform SDK.

This property is read/write with no default value. If no default subpicture LCID is specified, the MSDVDAdm object will play the subpicture stream that is marked as the default stream on the disc.

DisableScreenSaver Property

MSDVDAdm Object

Turns the system screen saver on or off.

Syntax

[ bDisabled = ] DVD.DVDAdm.DisableScreenSaver

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
bDisabled Boolean value indicating whether the system's screen saver settings are disabled for the DVD player application; TRUE means the settings are disabled.

This property is read/write with a default value of true.

Remarks

When viewing a DVD-Video disc, a user typically does not use the mouse or keyboard for extended periods of time. The MSWebDVD ActiveX® control therefore disables the system screen saver by default.

See Also

RestoreScreenSaver

GetParentalCountry Method

MSDVDAdm Object

Retrieves the parental country that was last saved to the registry.

Syntax

[ iParentalCountry = ] DVD.DVDAdm.GetParentalCountry();

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.

Return value

Returns an integer indicating the default country code stored in the registry.

Remarks

The parental country this method retrieves is not necessarily the same country currently stored in the MSWebDVD object.

GetParentalLevel Method

MSDVDAdm Object

Retrieves the parental level that was last saved to the registry.

Syntax

[ iParentalLevel = ] DVD.DVDAdm.GetParentalLevel();

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.

Return value

Returns an integer from 1 through 8 indicating the default parental level.

Remarks

The parental level this method retrieves is not necessarily the same level currently stored in the MSWebDVD control; to get the level currently stored in the control, call MSWebDVD.GetPlayerParentalLevel. A value of -1 indicates that parental management is disabled.

RestoreScreenSaver Method

MSDVDAdm Object

Restores the system screen saver settings.

Syntax

DVD.DVDAdm.RestoreScreenSaver();

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.

Return value

No return value.

Remarks

Generally, a DVD application will disable the system's screen saver on startup by setting the DisableScreenSaver property to true, and then re-enable the screen saver again when the DVD application is closed by calling RestoreScreenSaver. If an application does not use the system's screen saver settings, it does not have to call this method or set the DisableScreenSaver property.

SaveParentalCountry Method

MSDVDAdm Object

Saves the application's new parental country to the registry.

Syntax

DVD.DVDAdm.SaveParentalCountry( iCountry,  sUserName, sPassword);

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
iCountry Integer value specifying the parental country.
sUserName String value specifying the user name. Currently ignored.
sPassword String value specifying the password.

Return value

No return value.

Remarks

This method enables a user who knows the current password to save a new parental country setting to the registry. As with all the methods of MSDVDAdm, this method does not affect the current level in the player; it changes only the registry setting, so that the next time the MSWebDVD object is created, it will open with the new country. To change the parental country in the player, call MSWebDVD.SelectParentalCountry, which does not change the registry setting.

See Also

SaveParentalLevel

SaveParentalLevel Method

MSDVDAdm Object

Saves a new default parental level to the registry.

Syntax

DVD.DVDAdm.SaveParentalLevel( iLevel, sUserName, sPassword);

Parts

DVDObject that resolves to an MSWebDVD object.
DVDAdmThe MSWebDVD object's DVDAdm property.
iLevel Integer value from 1 through 8 specifying the parental level.
sUserName String value specifying the user name. Currently ignored.
sPassword String value specifying the password.

Return value

No return value.

Remarks

This method enables a user who knows the current password to save a new parental level setting to the registry. As with all the methods of MSDVDAdm, this method does not affect the current level in the player; it changes only the registry setting, so that the next time the MSWebDVD object is started, it will open with the new level. Specify -1 to disable parental management. To change the parental level in the player, call MSWebDVD.SelectParentallevel, which does not change the registry setting.