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 |
IWMSLoggingAdmin.Cycle (Visual Basic .NET)
The Cycle property specifies and retrieves an enumeration value indicating how often the log file cycles.
Syntax
IWMSLoggingAdmin .Cycle = WMS_LOG_CYCLE_TYPE WMS_LOG_CYCLE_TYPE = IWMSLoggingAdmin.Cycle
Property Value
A member of a WMS_LOG_CYCLE_TYPE enumeration type indicating how often the log file cycles. This must be one of the following values.
| Value | Description |
| WMS_LOG_CYCLE_NONE | The log file never cycles. |
| WMS_LOG_CYCLE_SIZE | The log file cycles based on the specified size. |
| WMS_LOG_CYCLE_MONTH | The log file cycles monthly. |
| WMS_LOG_CYCLE_WEEK | The log file cycles weekly. |
| WMS_LOG_CYCLE_DAY | The log file cycles daily. |
| WMS_LOG_CYCLE_HOUR | The log file cycles hourly. |
If this property fails, it throws an exception.
| Number | Description |
| 0x80004005 | The server cannot find the WMS Client Logging plug-in. |
| 0x80070057 | The value you specified does not contain a member of the WMS_LOG_CYCLE_TYPE enumeration. |
Remarks
A log file cycles when the existing file is removed and a new log file is created.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub SetCycle()
' Declare variables.
Dim Server As WMSServer
Dim Plugin As IWMSPlugin
Dim LogAdmin As IWMSLoggingAdmin
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
' Set the enumeration value indicating
' how often the log file is cycled.
LogAdmin.Cycle = WMS_LOG_CYCLE_TYPE.WMS_LOG_CYCLE_DAY
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 |