Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSCacheProxyCallback.OnRemoveCacheItem (C#)
The OnRemoveCacheItem method is called by the cache plug-in to respond when the server calls IWMSCacheProxy.RemoveCacheItem.
Syntax
Parameters
lHr
[in] int 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.
using System.Data;
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
void IWMSCacheProxy.RemoveCacheItem(
string stringOriginUrl,
IWMSCacheProxyCallback pCallback,
object varContext)
{
try
{
// Call a user-defined function to remove
// an entry from the cache item database.
RemoveEntryFromDatabase(stringOriginUrl,true);
// Call IWMSCacheProxyCallback.OnRemoveCacheItem.
pCallback.OnRemoveCacheItem(0,varContext);
}
catch(Exception e)
{
throw new COMException();
}
return;
}
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 |