Поделиться через


MSVidWebDVD.UOPValid Method

 
Microsoft DirectShow 9.0

MSVidWebDVD.UOPValid Method

This topic applies to Windows XP Service Pack 1 or later.

The UOPValid method retrieves a value that indicates whether the specified user operation (UOP) is currently valid.

Syntax

  VidWebDVD
  .UOPValid(
  lUOP As Long
) As Boolean

Parameters

lUOP

Specifies the user operation (UOP) as a Long. Values can include the following.

Value Description
0 PlayTitle, PlayAtTime, and PlayAtTimeInTitle
1 PlayChapter
2 PlayTitle
3 Stop (not enforced on the MSVidCtl object)
4 ReturnFromSubmenu
5 PlayChapter
6 PlayPrevChapter, ReplayChapter
7 PlayNextChapter
8 Forward play allowed.
9 Backward play allowed.
10 ShowMenu with a parameter value of 2 (DVD_MENU_Title).
11 ShowMenu with a parameter value of 3 (DVD_MENU_Root).
12 ShowMenu with a parameter value of 4 (DVD_MENU_Subpicture).
13 ShowMenu with a parameter value of 5 (DVD_MENU_Audio).
14 ShowMenu with a parameter value of 6 (DVD_MENU_Angle).
15 ShowMenu with a parameter value of 7 (DVD_MENU_Chapter).
16 Resume
17 SelectLeftButton, SelectRightButton, SelectUpperButton, and SelectLowerButton
18 StillOff
19 Pause (not enforced on the MSVidCtl object)
20 CurrentAudioStream
21 CurrentSubpictureStream
22 CurrentAngle, SelectParentalLevel
23 KaraokeAudioPresentationMode
24 Select video mode preference.

Return Values

Returns a Boolean indicating whether the specified operation is permitted.

Error Codes

If the property fails, Err.Number may be set to one of the following values.

Value Description
E_UNEXPECTED Unspecified error.
E_INVALIDARG UOP number less than 0 or greater than 24 entered.

Remarks

DVD authors can encode the disc to enable or disable certain commands by the user. These user operations (UOP) generally handle disc navigation. Attempting to access a property or method that is not currently allowed or valid will cause your application to raise an error. UOPValid allows you to determine if you can access a method or property to avoid such errors.

In addition to avoiding run-time errors, UOPValid allows you to visibly disable controls for prohibited actions on the user interface.

Certain methods—Stop, Pause, and Run—apply to both the MSVidWebDVD object and the MSVidCtl object. These methods should be run from the MSVidCtl object, or your application will raise an error. Disc permissions cannot prevent the MSVidCtl object from implementing these methods even when the UOPValid method returns false. However, an application designer may choose to disable user controls for these methods when the UOP value is false.

Example

' Check if forward or reverse play is allowed before changing playback rate.
dRate = txtRate.Text
If oVidWebDVD.UOPValid(&H80) And dRate > 0 Then  ' Handle forward.
   oVidWebDVD.Rate = dRate
ElseIf oVidWebDVD.UOPValid(&H100) And dRate < 0 Then   ' Handle reverse.
   oVidWebDVD.Rate = dRate
End If

Requirements

Reference: Add a reference to MS Video Control 1.0 Type Library and Microsoft Tuner 1.0 Type Library.

Library: Quartz.dll.

See Also