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 |
IWMSOutgoingDistributionConnection.UserName (C#)
The UserName property retrieves the authenticated name of the client.
Syntax
string = IWMSOutgoingDistributionConnection.UserName;
Property Value
A string containing the name.
Remarks
This property is read-only.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSOutgoingDistributionConnections Connections;
IWMSOutgoingDistributionConnection Connection;
string strName;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSOutgoingDistributionConnections object.
Connections = Server.OutgoingDistributionConnections;
// Retrieve information about each distribution connection.
for (int i = 0; i < Connections.Count; i++)
{
Connection = Connections[i];
// Retrieve the user name of the client.
strName = Connection.UserName;
}
}
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 |