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


Handling UOP Event Notifications

 
Microsoft DirectShow 9.0

Handling UOP Event Notifications

This component is available for use in the Microsoft Windows 2000, Windows XP, and Windows Server 2003 operating systems. It may be altered or unavailable in subsequent versions.

The MSWebDVD object sends UOP event notifications to inform an application when a specific user operation (UOP) has been enabled or disabled by the disc. Each user operation has its own event, with a single Boolean parameter indicating whether that operation is now enabled or disabled. See MSWebDVD Events for more information on specific events.

For each event that you wish to handle, specify an event handler as shown in the following example. (You can call your handler method anything you like.)

<SCRIPT LANGUAGE="JScript" FOR=DVD EVENT="PlayForwards(bEnabled)">
    PlayForwardsEventHandler(bEnabled)
</SCRIPT>

Now define your handler method to respond appropriately to the event. Assume that the "button_Play" variable here is the id attribute of the "Play" button in your application.

function PlayForwardsEventHander(bEnabled)
{
  if(bEnabled == true)
    button_Play.disabled = false;
  else
    button_Play.disabled = true;
}