IWMSLoggingAdmin.ExpandTemplate (Visual Basic .NET)
Previous | Next |
IWMSLoggingAdmin.ExpandTemplate (Visual Basic .NET)
The ExpandTemplate method retrieves the expanded path of the template.
Syntax
String = IWMSLoggingAdmin.ExpandTemplate(bstrTemplate)
Parameters
bstrTemplate
[in] String containing the name of the template.
Return Values
This method returns a String containing the expanded path of the template.
If this method fails, it throws an exception.
Number | Description |
0x80004005 | The server cannot find the WMS Client Logging plug-in. |
Remarks
A template path may contain wildcard characters that are replaced with appropriate values when the file is created by the server. Valid wildcard characters used by Windows Media Services are identified in the following table.
- Note When the information denoted by the wildcard is not present on the system, the server will substitute an underscore character (_) for it. Also, because a playlist is considered a single presentation unit, time, and date wildcards will expand to the same value for all entries in the playlist.
Wildcard character | Description |
<a> | Abbreviated weekday name (three letters). |
<A> | Full weekday name. |
<b> | Abbreviated month name (three letters). |
<B> | Full month name. |
<c> | Date and time representation appropriate for the locale of the server generating the file. |
<d> | Day of the month in a two-digit format (01 - 31). |
<H> | Hour in 24-hour, two-digit format (00 - 23). |
<I> | Hour in 12-hour, two-digit format (01 - 12). |
<j> | Day of the year in a three-digit format (001 - 366). |
<m> | Month in a two-digit format (01 - 12). |
<M> | Minute in a two-digit format (00 - 59). |
<N> | A four-digit sequence that starts at zero and is incremented every time a new file is added. The counter is reset to zero when the rest of the file name (not including the four-digit sequence) changes in any way. |
<P> | The 12-hour format AM or PM indicator of the server generating the file. |
<S> | Seconds in two-digit format (00 - 59). |
<T> | The name of the server generating the file. |
<U> | Week of the year in a two-digit format (00 - 53), with Sunday as the first day of the week. |
<V> | The name of the publishing point from which content is being archived. If content is being archived from the default publishing point, "[Default]" is inserted in the archive file name. If the publishing point name contains a forward slash (/), the forward slash is replaced with an underscore (_). If the publishing point is renamed, the archive file automatically cycles to reflect the new name. |
<w> | Day of the week as a decimal number in a 1-digit format (0 - 6; Sunday is 0). |
<W> | Week of the year in a two-digit format (00 - 53), with Monday as the first day of the week. |
<x> | Date representation for the current locale of the server generating the log file. |
<X> | Time representation for the current locale of the server generating the log file. |
<y> | Year without the century in a two-digit format (00 - 99). |
<Y> | Year with the century in a four-digit format (for example 1999, or 2003). |
<z> or <Z> | Time zone name or abbreviation. There are no characters if the time zone is unknown. |
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetExpandedPath() ' Declare variables. Dim Server As WMSServer Dim Plugin As IWMSPlugin Dim LogAdmin As IWMSLoggingAdmin Dim strExpanded As String Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the plug-in to be configured. Plugin = Server.EventHandlers.Item("WMS Client Logging") ' Retrieve the custom interface of the plug-in. LogAdmin = Plugin.CustomInterface ' Retrieve the expanded form of the ' current log file name template. strExpanded = LogAdmin.ExpandTemplate(LogAdmin.Template) 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 |