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 |
IWMSFileDescriptions.Item (Visual Basic .NET)
The Item property retrieves an IWMSFileDescription object from the IWMSFileDescriptions collection.
Syntax
IWMSFileDescription = IWMSFileDescriptions.Item( varIndex As Variant )
Parameters
varIndex
[in] Variant containing the index of the IWMSFileDescription object.
Property Value
An IWMSFileDescription object.
Remarks
This property is read-only.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetItem()
' Declare variables.
Dim Server As WMSServer
Dim FileDescriptions As IWMSFileDescriptions
Dim FileDescription As IWMSFileDescription
Dim strPath As String
Dim i As Integer
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the IWMSFileDescriptions object.
strPath = "file://c:\wmpub\wmroot"
FileDescriptions = Server.FileDescriptions(strPath, WMS_FILE_TYPE.WMS_FILE_UNSPECIFIED)
' Retrieve each description in the collection.
For i = 0 To FileDescriptions.Count - 1
FileDescription = FileDescriptions.Item(i)
Next i
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
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
| Previous | Next |