RasConnection Class

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Represents a remote access connection. This class cannot be inherited.

Namespace: DotRas
Assembly: DotRas (in DotRas.dll) Version: 1.3.5166.33435 (1.3.0.0)

Syntax

C#
public sealed class RasConnection : MarshalByRefObject
Visual Basic
Public NotInheritable Class RasConnection
	Inherits MarshalByRefObject
Visual C++
public ref class RasConnection sealed : public MarshalByRefObject
F#
[<SealedAttribute>]
type RasConnection =  
    class
        inherit MarshalByRefObject
    end

Remarks

Known Limitations

  • A connection is not considered active until the connection has completed connecting successfully. If the connection attempt is still under way, the connection will not be available from GetActiveConnections()()()() or other related methods.

Examples

The following example shows how to disconnect all active connections on the machine.
C# Copy imageCopy
ReadOnlyCollection<RasConnection> connections = RasConnection.GetActiveConnections();
foreach (RasConnection connection in connections)
{
    connection.HangUp();
}
Visual Basic Copy imageCopy
Dim connections As ReadOnlyCollection(Of RasConnection) = RasConnection.GetActiveConnections()
For Each connection As RasConnection In connections
    connection.HangUp()
Next

Inheritance Hierarchy

System..::..Object
  System..::..MarshalByRefObject
    DotRas..::..RasConnection

See Also