IWMSPublishingPoint2 Object (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSPublishingPoint2 Object (Visual Basic .NET)
You can use the IWMSPublishingPoint2 object to enable Startup Profile on a publishing point.
- **Note **This object is available only on Windows Server 2003, Enterprise Edition with Service Pack 1; Windows Server 2003, Datacenter Edition with Service Pack 1; and Windows Server 2008.
In addition to the methods and properties inherited from the IWMSPublishingPoint object, the IWMSPublishingPoint2 object exposes the following property.
| Property | Description |
| AllowStartupProfile | Specifies and retrieves a Boolean value that indicates whether the publishing point allows the use of Startup Profile. |
Example Code
The following example illustrates how to retrieve an IWMSPublishingPoint2 object.
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub EnableStartupProfile()
' Declare variables.
Dim Server As IWMSServer
Dim PubPoints As IWMSPublishingPoints
Dim PubPoint As IWMSPublishingPoint
Dim PubPoint2 As IWMSPublishingPoint2
Dim i As Integer
Try
' Create a new WMSServer object.
Server = New WMSServerClass
' Retrieve the IWMSPublishingPoints object.
PubPoints = Server.PublishingPoints
' Retrieve each publishing point and retrieve the
' IWMSPublishingPoint2 object. You can retrieve this
' object only from a cache/proxy on-demand
' or cache/proxy broadcast publishing point.
For i = 0 To PubPoints.Count - 1
PubPoint = PubPoints.Item(i)
If PubPoint.Type = WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_CACHE_PROXY_BROADCAST Or PubPoint.Type = WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_CACHE_PROXY_ON_DEMAND Then
PubPoint2 = PubPoint
Exit For
End If
Next i
Catch comExc As COMException
' TODO: Handle COM exceptions.
Catch exc As Exception
' TODO: Handle exceptions.
Finally
' TODO: Clean-up code goes here.
End Try
End Sub
See Also
| Previous | Next |