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);
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
Return Values
Name Description iRetVal The status of the connection, see Remarks
Examples
The following example connects "My Connection" and then displays the connection status:
<script> var objGeneric = new ActiveXObject("PocketBrowser.Generic"); objGeneric.RasConnect("My Connection", "Username", "Password", "Domain"); switch(objGeneric.ConnectionStatus("My Connection")) { case 0x0000: alert("Port Open"); break; case 0x1000: alert("Paused"); break; case 0x2000: alert("Done"); break; } </script>
Copy example to clipboard
Remarks
Return ValuesPossible return values are: Port Open (0x0000), Paused (0x1000), Done (0x2000)
Additional Information
Supported Platforms Windows CE, Windows Mobile Persistence Runs immediately. Min. Requirements None.