Share via


IWMSCacheProxyCallback.OnRemoveCacheItem (Visual Basic .NET)

banner art

Previous Next

IWMSCacheProxyCallback.OnRemoveCacheItem (Visual Basic .NET)

The OnRemoveCacheItem method is called by the cache plug-in to respond when the server calls IWMSCacheProxy.RemoveCacheItem.

Syntax

  

Parameters

lHr

[in] Integer indicating whether the call to IWMSCacheProxy.RemoveCacheItems was successful.

varContext

[in] Object containing a value defined by the server to identify which call to IWMSCacheProxy.RemoveCacheItem the plug-in is responding to when it calls OnRemoveCacheItem. You must pass this value back unaltered.

Return Values

This method does not return a value.

Example Code

The following example assumes that the cache plug-in makes use of the .NET DataSet collection of DataTable objects. Each DataRow object in the data table represents one IWMSCacheDescriptor object.

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

Public Sub RemoveCacheItem(ByVal OriginUrl As String, _
                           ByVal Callback As IWMSCacheProxyCallback, _
                           ByVal varContext As Object) _
  Implements Microsoft.WindowsMediaServices.Interop.IWMSCacheProxy.RemoveCacheItem

    Try
        ' Call a user-defined function to remove
        ' an entry from the cache item database.
        ' RemoveEntryFromDatabase(OriginUrl, True)

        ' Call IWMSCacheProxyCallback.OnRemoveCacheItem.
        Callback.OnRemoveCacheItem(0, varContext)

    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