RasEntry Class

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Represents a remote access service (RAS) entry. 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 RasEntry : MarshalByRefObject, 
	ICloneable
Visual Basic
Public NotInheritable Class RasEntry
	Inherits MarshalByRefObject
	Implements ICloneable
Visual C++
public ref class RasEntry sealed : public MarshalByRefObject, 
	ICloneable
F#
[<SealedAttribute>]
type RasEntry =  
    class
        inherit MarshalByRefObject
        interface ICloneable
    end

Remarks

The static methods for creating entries on this object are not required to create an entry, however they do contain default information set by Windows for each platform.

Known Limitations

  • The methods exposed on this class typically require the entry to belong to a phone book before they can be called.

Examples

The following example shows how to create a VPN entry and add it to a phone book.
C# Copy imageCopy
using (RasPhoneBook pbk = new RasPhoneBook())
{
    pbk.Open();
    RasEntry entry = RasEntry.CreateVpnEntry("VPN Connection", "127.0.0.1", RasVpnStrategy.Default, RasDevice.GetDeviceByName("(PPTP)", RasDeviceType.Vpn));
    if (entry != null)
    {
        pbk.Entries.Add(entry);
    }
}
Visual Basic Copy imageCopy
Dim pbk As New RasPhoneBook
pbk.Open()
Dim entry As RasEntry = RasEntry.CreateVpnEntry("VPN Connection", "127.0.0.1", RasVpnStrategy.Default, RasDevice.GetDeviceByName("(PPTP)", RasDeviceType.Vpn)
If entry IsNot Nothing Then
    pbk.Entries.Add(entry)
End If

Inheritance Hierarchy

System..::..Object
  System..::..MarshalByRefObject
    DotRas..::..RasEntry

See Also