IWMSLoggingAdmin.FreeSpaceQuota (C#)

The FreeSpaceQuota property specifies and retrieves the minimum percentage disk space that must remain after data has been written to a log file.

LoggingAdmin.FreeSpaceQuota = intint = LoggingAdmin.FreeSpaceQuota;

Property Value

An int containing the minimum percentage disk space. The percentage must not be greater than 100 or less than 0.

If this property fails, it throws an exception.

Number

Description

0x80004005

The logging plug-in could not be found.

0x80070057

The value you specified is greater than 100 or less than 0.

Remarks

The server stops logging data when the remaining disk space percentage equals the amount specified by this property.

Example

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

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

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;

    // Retrieve the disk space quota.
    iDiskQuota = LogAdmin.FreeSpaceQuota;

}

catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception) 
{
    // 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#)