| Class TModemDetectDlg (unit Detmodem) |
TForm
| Constructors |
| Functions |
procedure Dial1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure OKClick(Sender: TObject);
function GetBrand(Port : Word) : String;
function GetHighBaud(Port : Word) : Word;
function OpenCommPort(Port : Word) : Boolean;
function Query(Port : Word; Info : String) : String;
function QueryBaud(Port : Word) : String;
function TestPort(Port : Word) : Boolean;
function WaitString(szString : String; dwTime : LongInt) : Boolean;| Properties |
property BaudRate : LongInt
property ComPort : LongInt| Events |
| Variables |
Label1 : TLabel;
Label2 : TLabel;
ListBox1 : TListBox;
OK : TButton;
Timer1 : TTimer;
FBaudRate : LongInt;
FComPort : LongInt;
idComDev : Integer;| Constructors |
| Functions |
procedure Dial1Click(Sender: TObject);Stores high baud for modems
procedure FormCreate(Sender: TObject);
procedure OKClick(Sender: TObject);
function GetBrand(Port : Word) : String;TModemDetectDlg.GetBrand Returns the "Brand" of the modem (may not actually be the Brand)
function GetHighBaud(Port : Word) : Word;
function OpenCommPort(Port : Word) : Boolean;TModemDetectDlg.OpenCommPort Attempts to open a Comm port. Returns True if the open is successful, False otherwise.
function Query(Port : Word; Info : String) : String;TModemDetectDlg.Query Send an AT command to the modem and return a one-line response. Assumes that there is a modem attached to the port.
function QueryBaud(Port : Word) : String;TModemDetectDlg.QueryBaud Returns the high baud, according to the modem
function TestPort(Port : Word) : Boolean;TModemDetectDlg.TestPort Determines if a modem is connected to a port by sending a modem initialization string to the port, and waiting for the 'OK' response
function WaitString(szString : String; dwTime : LongInt) : Boolean;TModemDetectDlg.WaitString Waits for a string from the modem for dwTime milliseconds. Returns True if the string is received, False otherwise
| Properties |
property BaudRate : LongIntPublic declarations
property ComPort : LongInt| Events |
| Variables |
Label1 : TLabel;
Label2 : TLabel;
ListBox1 : TListBox;
OK : TButton;
Timer1 : TTimer;
FBaudRate : LongInt;
FComPort : LongInt;
idComDev : Integer;Private declarations