IWMSPublishingPoint.AllowClientsToConnect (C#)
Previous | Next |
IWMSPublishingPoint.AllowClientsToConnect (C#)
The AllowClientsToConnect property specifies and retrieves a Boolean value that indicates whether the publishing point can receive client connections.
Syntax
IWMSPublishingPoint .AllowClientsToConnect = bool; bool = IWMSPublishingPoint.AllowClientsToConnect;
Property Value
A bool indicating whether the publishing point can receive client connections. By default, this parameter is true.
If this property fails, it throws an exception.
Number | Description |
0xC00D145AL | The publishing point was already removed. |
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPublishingPoints PubPoints; IWMSPublishingPoint PubPoint; bool bVal; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the IWMSPublishingPoints object. PubPoints = Server.PublishingPoints; // Retrieve information about each publishing point. for (int i = 0; i < PubPoints.Count; i++) { PubPoint = PubPoints[i]; // Retrieve a Boolean value indicating whether // clients can connect. bVal = PubPoint.AllowClientsToConnect; // Set a Boolean value indicating that // clients cannot connect. PubPoint.AllowClientsToConnect = false; } } 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 |