SocketWrench .NET Edition

InternetDialer.AutoConnect Property

Automatically inherit connections established by another process.

[Visual Basic]
Public Property AutoConnect As Boolean
[C#]
public bool AutoConnect {get; set;}

Property Value

A boolean value which specifies if connections are automatically inherited by the class.

Remarks

The AutoConnect property determines if the class automatically detects if a connection has been established by another process. When enabled, the class will periodically check for any connections that have been established. The Interval property controls the frequency in which the control performs this check.

If the class detects that a connection has been made, it will immediately fire the OnConnect event, followed by the OnStatus event, to indicate that a connection has been established. The class then begins to monitor that connection as usual, until that connection is dropped or the control is unloaded.

To periodically check to see if a connection has been established by another process without using the AutoConnect property, read the value of the Connections property, which returns the number of active dial-up networking connections. A value greater than zero indicates that a dial-up networking connection has been established.

If there are multiple dial-up networking devices on the system, it may be possible for more than one connection to be active at a time. If this is the case, setting the AutoConnect property to true will cause the class to inherit the first active connection. To manage multiple dial-up connections, use the Connection array to enumerate the available connections and set the Handle property to take control of a specific session.

See Also

InternetDialer Class | SocketTools Namespace