IWMSCacheProxyServerCallback.OnGetContentInformation (Visual Basic .NET)

banner art

Previous Next

IWMSCacheProxyServerCallback.OnGetContentInformation (Visual Basic .NET)

The OnGetContentInformation method is called by the server to respond when a cache plug-in calls IWMSCacheProxyServer.GetContentInformation.

Syntax

  

Parameters

lHr

Int32 indicating whether the call to IWMSCacheProxyServer.GetContentInformation succeeded.

pContentInfo

IWMSContext object containing a cache content information context. The context includes a variable named WMS_CACHE_CONTENT_INFORMATION_CONTENT_TYPE, which can be zero to indicate on-demand content, or one of the values in the following table, or a bitwise OR of both values.

Value Description
WMS_CACHE_CONTENT_TYPE_BROADCAST The content is a broadcast.
WMS_CACHE_CONTENT_TYPE_PLAYLIST The content is a playlist.

varContext

Object containing a value defined by the plug-in when it called IWMSCacheProxyServer.GetContentInformation. For example, your plug-in can use this parameter to persist state information. The server does not alter this value and passes it back when calling OnGetContentInformation.

Return Values

This method does not return a value. To report an error, the plug-in can throw a COMException object to the server. If the plug-in uses the IWMSEventLog object to log error information, it is recommended that it throw NS_E_PLUGIN_ERROR_REPORTED (0xC00D157D). Typically, the server attempts to make plug-in error information available to the server object model, the Windows Event Viewer, and the troubleshooting list in the details pane of the Windows Media Services MMC. However, if the plug-in uses the IWMSEventLog object to send custom error information to the Windows Event Viewer, throwing NS_E_PLUGIN_ERROR_REPORTED stops the server from also logging to the event viewer. For more information about plug-in error information, see Identifying Plug-in Errors.

Remarks

Cache proxy plug-ins generally call GetContentInformation when performing any of the following operations:

  • Rolling over to a different protocol
  • Establishing a cache-miss policy
  • Processing a prestuff request

In each case, the plug-in must get more information about the content before it can proceed. For example, to establish a cache-miss policy, the plug-in must determine whether the content is a broadcast, a playlist, or on demand. Also, before prestuffing content, it must determine whether the content can be cached.

Example Code

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices










































































































Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Previous Next