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 |
IWMSServer.Status (C#)
The Status property retrieves an enumeration value indicating the current state of the server.
Syntax
WMS_SERVER_STATUS = IWMSServer.Status;
Property Value
A member of a WMS_SERVER_STATUS enumeration type representing the current state of the server. This must be one of the following values.
| Value | Description |
| WMS_SERVER_RUNNING | The server is running. |
| WMS_SERVER_ERROR | A non-critical error has occurred. |
| WMS_SERVER_ERROR_CRITICAL | A critical error has occurred. |
Remarks
This property is read-only.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Retrieve the status of the server.
WMS_SERVER_STATUS ssStatus;
ssStatus = Server.Status;
if (ssStatus == WMS_SERVER_STATUS.WMS_SERVER_RUNNING)
{
// TODO: Handle server running status.
}
else if (ssStatus == WMS_SERVER_STATUS.WMS_SERVER_ERROR)
{
// TODO: Handle server error status.
}
else if (ssStatus == WMS_SERVER_STATUS.WMS_SERVER_ERROR_CRITICAL)
{
// TODO: Handle server critical error status.
}
}
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 |