Unit SModem

Version - 1.0 Copyright (c) - 1997 by Rick Sanden Legal - We are not responsible for anything at all. This is Freeware. E-Mail - SandMan-Inc@worldnet.att.net (mail me if you have bugs thanks) Description - This Component will use recusion to search the Win95 registry (starting at Enum/ISAPNP) for all Modem class entries. Upon finding a Modem class entry the component will store the info on that entry for later use. Note: This component could be modified slightly to search the registry for anything. Have fun Functions: FindModem - This function searches and sets up the info structures. Always call him before any other function. Returns the number of modems found or a error code. GetFirst - Gets the first modem found. Returns TModemInfo record. GetLast - Gets the last modem found Returns TModemInfo record. Get - Gets the modem info on certain modem. Input the modem # Returns TModemInfo record. Example: Get(2) gets the info on the second modem found. GetError - Gets the error message on the error returned by findmodem. Input the error number. Returns a string explaining the error. History ------------------------------ May 9, 97 - Initial Release

Classes

TSenseModem -

Functions

Register - Free All

Types

TModemInfo

Constants

DEFAULTDEBUGPATH
MAX_COM
NOERROR
NOMODEM
NOREGENUM

Variables

Debug_file
RegistryEntries


Functions


procedure Register;

Free All

Types


TModemInfo = record
ModemIsThere : boolean;
Classtype : string;
CompatibleIDs : string;
ConfigFlags : TRegdataInfo;
DeviceDesc : string;
Driver : string;
FriendlyName : string;
HardwareID : string;
Mfg : string;
PORTNAME : string;
end;
This structures copies what is stored in the registry for a modem.

Constants

DEFAULTDEBUGPATH = '.\debug.txt'

MAX_COM = 10

Hope we do not have more than 10 modems attached

NOERROR = 0

NOMODEM = 0

NOREGENUM = -2


Variables

Debug_file : TextFile

RegistryEntries : TRegistry