Share via


IWMSCacheProxy.OnCacheClientClose (Visual Basic .NET)

banner art

Previous Next

IWMSCacheProxy.OnCacheClientClose (Visual Basic .NET)

The OnCacheClientClose method is called by the server to indicate that a client has finished streaming content.

Syntax

  

Parameters

resultHr

[in] int indicating whether the client finished playing content. If the client finished successfully, this parameter will be zero. If the client was not successful, the server passes an error code.

pUserContext

[in] IWMSContext object containing the user context.

pPresentationContext

[in] IWMSContext object containing the presentation context.

Return Values

This method does not return a value.

Remarks

The cache proxy plug-in can implement this method for a variety of reasons. For example, it can be used to collect statistics about the content being played, or it can be used to determine whether the requested content is played enough times to justify downloading it.

Example Code

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

Public Sub FindCacheItem(ByVal OriginUrl As String, ByRef CacheItemDescriptor As IWMSCacheItemDescriptor) _
  Implements IWMSCacheProxy.FindCacheItem

    Try
      CacheItemDescriptor = Nothing

    Catch
      Throw New COMException()
    End Try

End Sub

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