RasDevice Class

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Represents a TAPI device capable of establishing 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#
[SerializableAttribute]
public sealed class RasDevice
Visual Basic
<SerializableAttribute>
Public NotInheritable Class RasDevice
Visual C++
[SerializableAttribute]
public ref class RasDevice sealed
F#
[<SealedAttribute>]
[<SerializableAttribute>]
type RasDevice =  class end

Examples

The following example shows how to update the device used by a phone book entry.
C# Copy imageCopy
using (RasPhoneBook pbk = new RasPhoneBook())
{
   pbk.Open();
   RasEntry entry = pbk.Entries["VPN Connection"];
   if (entry != null)
   {
       entry.Device = RasDevice.GetDeviceByName("(PPTP)", RasDeviceType.Vpn);
       entry.Update();
   }
}
Visual Basic Copy imageCopy
Dim pbk As RasPhoneBook
Try
   pbk = New RasPhoneBook
   pbk.Open()
   Dim entry As RasEntry = pbk.Entries("VPN Connection")
   If (entry IsNot Nothing) Then
       entry.Device = RasDevice.GetDeviceByName("(PPTP)", RasDeviceType.Vpn)
       entry.Update()
   End If
Finally
   If (pbk IsNot Nothing) Then
       pbk.Dispose()
   End If 
End Try

Inheritance Hierarchy

System..::..Object
  DotRas..::..RasDevice

See Also