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.




The logging plug-in could not be found.


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


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


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

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

    // 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.


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


IWMSLoggingAdmin Object (C#)