IWMSLoggingAdmin.MaxSize (C#)
.gif)
| Previous | Next |
IWMSLoggingAdmin.MaxSize (C#)
The MaxSize property specifies and retrieves the maximum permitted size of the log file.
Syntax
IWMSLoggingAdmin .MaxSize = int; int = IWMSLoggingAdmin.MaxSize;
Property Value
int containing the maximum file size in kilobytes.
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 is less than or equal to zero. |
Remarks
This property applies only when the WMS_LOG_CYCLE_TYPE enumeration type is WMS_LOG_CYCLE_SIZE. For more information, see the IWMSLoggingAdmin.LoggedEvents property.
Example Code
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;
// Set the maximum size of a log file.
LogAdmin.MaxSize = 10000;
}
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
| Previous | Next |