RasConnect Method

PocketBrowser 3.x API

The RasConnect Method of the Generic ActiveX Object connects a specified modem/serial connection.

RasConnect (Method of the Generic ActiveX Object) Syntax
var iRetVal = objGeneric.RasConnect(strEntry, strUser, strPwd, strDomain);

ParametersW Toggle Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description
Default Value
strEntry String Name of the phone book entry to be connected N/A
strUser String The username for the connection N/A
strPwd String The user's password for the connection N/A
strDomain String The domain name to be used for the connection N/A

axReturns Toggle Return Values

Name Description
iRetVal The status of the connection, see Remarks

Examples Toggle Examples

The following example connects "My Connection" and then displays the connection status:

var objGeneric = new ActiveXObject("PocketBrowser.Generic");

objGeneric.RasConnect("My Connection", "Username", "Password", "Domain");

switch(objGeneric.ConnectionStatus("My Connection"))
case 0x0000:
alert("Port Open");

case 0x1000:

case 0x2000:
Copy example to clipboard Copy example to clipboard

Remarks Toggle Remarks

Return Values
Possible return values are: Port Open (0x0000), Paused (0x1000), Done (0x2000)

Info Toggle Additional Information

Supported Platforms Windows CE, Windows Mobile
Persistence Runs immediately.
Min. Requirements None.