IWMSCacheProxyCallback.OnRemoveCacheItem (C#)

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

void IWMSCacheProxyCallback.OnRemoveCacheItem(
  int lHr,
  object varContext


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

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

This method does not return a value.


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.

using System.Data;
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

void IWMSCacheProxy.RemoveCacheItem( 
                        string stringOriginUrl,
                        IWMSCacheProxyCallback pCallback,
                        object varContext)
    // Call a user-defined function to remove
    // an entry from the cache item database.

    // Call IWMSCacheProxyCallback.OnRemoveCacheItem.

  catch(Exception e)
    throw new COMException();



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


IWMSCacheProxyCallback Object (C#)