Share via


IWMSLoggingAdmin.CycleNow (C#)

The CycleNow method forces a log file cycle regardless of the value set by any previous invocation of the Cycle property.

IWMSLoggingAdmin.CycleNow();

Arguments

This method takes no parameters.

Return Value

This method does not return a value.

Example

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSLoggingAdmin LogAdmin;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers[
                        "WMS Client Logging"];

    // Retrieve the custom interface of the plug-in.
    LogAdmin =
        (IWMSLoggingAdmin)Plugin.CustomInterface;

    // Cycle the log so that any new configuration
    // will take effect immediately.
    LogAdmin.CycleNow();
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

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

Reference

IWMSLoggingAdmin Object (C#)

IWMSLoggingAdmin.Cycle (C#)