RE: Publishing points
From: David Chen [MS] (dachen_at_online.microsoft.com)
Date: 03/03/04
- Next message: Matt: "Re: Load Test"
- Previous message: Jeremy: "Re: Best Raid Level for Streaming?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 03 Mar 2004 20:12:14 GMT
yoss22:
It is possible by doing some VB/.NET programs. User can retrieve the
Server's PublishPoints collection and then go through each publishing point
to retrieve its' name and other properties. Download the Server SDK from
"http://www.microsoft.com/windows/windowsmedia/download/default.asp" for
more details about programming interfaces.
I attached part of the code for your reference:
=======================================
IWMSPublishingPoint.Name (Visual Basic .NET)
The Name property specifies and retrieves the name of the publishing point.
Syntax
IWMSPublishingPoint.Name = String
String = IWMSPublishingPoint.Name
Property Value
A String containing the name.
If this property fails, it returns an error number.
Number Description
0x8007000E There is insufficient memory to complete the function.
0xC00D0036L String is already being used by another publishing point.
0xC00D1455L String contains an invalid character. Invalid characters are: &
" ' < > \ and the ANSI characters 0-31 and 127.
0xC00D1392L String is longer than the maximum length allowed.
0xC00D145AL The publishing point was already removed.
0xC00D1452L The method is not supported for cache proxy publishing points.
Remarks
The name must be unique. You can indicate the home publishing point by
specifying only the forward slash character (/). There can be only one home
publishing point, and it can be either a broadcast or on-demand publishing
point. A home publishing point is not mandatory, but it enables clients to
connect using the shorter URL formats such as protocol://server_name and
protocol://server_name/file_name.
All other publishing point names must not contain a leading or trailing /,
but a / character is permitted in the middle of a name. The following
characters are not permitted:
< > \ ? % & ' # { } | ^ [ ] `
White spaces are permitted in the name, but the server will strip leading
and trailing white spaces.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetSetPubPointName()
' Declare variables.
Dim Server As WMSServer
Dim PubPoints As IWMSPublishingPoints
Dim PubPoint As IWMSPublishingPoint
Dim strText As String
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the IWMSPublishingPoints object.
PubPoints = Server.PublishingPoints
' Retrieve information about each publishing point.
For Each PubPoint In PubPoints
' Retrieve the displayed name of the publishing point.
strText = PubPoint.Name
' Change the name of the publishing point.
strText = "Modified Pub Point Name"
PubPoint.Name = strText
Next
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
Thanks for using Windows Media Serverices.
David Chen
Digital Media Division
This posting is provided "AS IS" with no warranties, and confers no rights.
- Next message: Matt: "Re: Load Test"
- Previous message: Jeremy: "Re: Best Raid Level for Streaming?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|