RasConnection.GetActiveConnectionByName Method (String, String)

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Retrieves an active connection by the entry name and phone book path.

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

Syntax

C#
[ObsoleteAttribute("This method will be removed in a future version, please use the GetActiveConnections method to find the connection.", 
	false)]
public static RasConnection GetActiveConnectionByName(
	string entryName,
	string phoneBookPath
)
Visual Basic
<ObsoleteAttribute("This method will be removed in a future version, please use the GetActiveConnections method to find the connection.", 
	false)> 
Public Shared Function GetActiveConnectionByName ( 
	entryName As String,
	phoneBookPath As String
) As RasConnection
Visual C++
public:
[ObsoleteAttribute(L"This method will be removed in a future version, please use the GetActiveConnections method to find the connection.", 
	false)]
static RasConnection^ GetActiveConnectionByName(
	String^ entryName, 
	String^ phoneBookPath
)
F#
[<ObsoleteAttribute("This method will be removed in a future version, please use the GetActiveConnections method to find the connection.", 
	false)>]
static member GetActiveConnectionByName : 
        entryName : string * 
        phoneBookPath : string -> RasConnection 

Parameters

entryName
Type: System..::..String
The name of the entry.
phoneBookPath
Type: System..::..String
The path (including filename) of the phone book containing the entry.

Return Value

Type: RasConnection
A RasConnection if the connection was found; otherwise, a null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
System..::..ArgumentException entryName and/or phoneBookPath are null reference (Nothing in Visual Basic).

See Also