Share via


MSVidWebDVD.UOPValid Method

Note  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.

VidWebDVD.UOPValid(
   lUOP As Long
) As Boolean

Parameters

Return Value

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.

Add a reference to MS Video Control 10 Type Library and Microsoft Tuner 10 Type Library.

Examples

' 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

Type Library Use MS Video Control 1.0 Type Library and Microsoft Tuner 1.0 Type Library.
DLL Requires Quartz.dll.

See Also

MSVidWebDVD Object

Send comments about this topic to Microsoft

Build date: 12/4/2008