IWMSCacheProxy.OnCacheClientClose (Visual Basic .NET)

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

IWMSCacheProxy.OnCacheClientClose(  resultHr As Int32,
  pUserContext As IWMSContext,
  pPresentationContext As IWMSContext


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

[in] IWMSContextIWMSContext Object (Visual Basic .NET) containing the User Context.

[in] IWMSContext object containing the Presentation Context.

Return Value

This method does not return a value.


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.


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

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

      CacheItemDescriptor = Nothing

      Throw New COMException()
    End Try

End Sub


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


IWMSCacheProxy Object (Visual Basic .NET)