The ConnectionStatus Method of the Generic ActiveX Object retrieves the status of a named modem/serial connection.
ConnectionStatus (Method of the Generic ActiveX Object) Syntax var iRetVal = objGeneric.ConnectionStatus(strName);
Parameters
Items listed in this section indicate parameters, or attributes which can be set.
Name Possible Values Description
Default Value strName String Phone book entry name for connection N/A
Return Values
Name Description iRetVal The status of the connection
Examples
The following javascript example pops up an alert box showing the status of the modem or serial device:
<script> var objGeneric = new ActiveXObject("PocketBrowser.Generic"); 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.