Share via


IWMSCacheItems Object (Visual Basic .NET)

banner art

Previous Next

IWMSCacheItems Object (Visual Basic .NET)

The IWMSCacheItems object contains a collection of IWMSCacheItem objects that can be used to retrieve information about cached content.

The IWMSCacheItems collection exposes the following methods.

Method Description
Delete Removes an IWMSCacheItem object from the IWMSCacheItems collection.
DeleteAll Removes all IWMSCacheItem objects from the IWMSCacheItems collection.
Count Retrieves the number of IWMSCacheItem objects contained in the IWMSCacheItems collection.
Item Retrieves an IWMSCacheItem object from the IWMSCacheItems collection.
length Retrieves the number of IWMSCacheItem objects contained in the IWMSCacheItems collection. This method is provided for JScript compatibility.

Example Code

The following example illustrates how to retrieve an IWMSCacheItems object.

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

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugins As IWMSPlugins
    Dim CacheProxyPlugin As IWMSCacheProxyPlugin
    Dim CacheItems As IWMSCacheItems

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPlugins object
    ' containing cache proxy plug-ins.
    Plugins = Server.CacheProxy

    ' Retrieve the IWMSCacheProxyPlugin object.
    CacheProxyPlugin = Plugins.Item(0)

    ' Retrieve the IWMSCacheItems object.
    CacheItems = CacheProxyPlugin.CacheItems

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

See Also

Previous Next