RE: Publishing points

From: David Chen [MS] (dachen_at_online.microsoft.com)
Date: 03/03/04


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.



Relevant Pages

  • Re: Best guitar youve ever owned?
    ... If you ask a 7 string player, he or she will tell you 7. ... of publishing is selling music and last I heard there are more 6 string ... guitarists than 8 string guitarists :-). ...
    (rec.music.classical.guitar)
  • How to get reference to Publishing Point in a custom plugin?
    ... I am trying to get a reference to the publishing point of a custom plugin ... I tried using IWMSCommandContext to get the string ...
    (microsoft.public.windowsmedia.sdk)
  • Re: convert date from string to date format
    ... On Apr 9, 11:11 am, Howard - JC Publishing ... stores dates as a string such as 20080124. ... mm/dd/yyyy. ...
    (microsoft.public.excel)
  • Re: DC comics could almost certainly vastly increase the sales of their comics
    ... company basically is "paying" for the character. ... This is a way in which superhero comics differ from book ... To the extent book publishing is like comics, its done on a work for ... Siegal has admitted that Superman ...
    (rec.arts.comics.dc.universe)
  • Re: who was Armand Coppens?
    ... character in the book? ... It was only in the late 90s that she revealed herself to be Dominique Aury, an employee of a Publishing House. ... As to Armand Coppens, there actually was an Armand Coppens who was born in Saskatchewan, Canada in 1922, and who would have been about the correct age to right the Memoirs in 1969. ... The original text was in English and published at th Grove Press, which gives the linguistic background of the author, but does not indicate any nationality, since at that time, few publishers showed the courage of Grove Press to publish controversial books. ...
    (rec.collecting.books)