Solved

Device Name For Modem

Posted on 2000-03-15
3
158 Views
Last Modified: 2010-04-04
How can I find the device name given to an installed modem.
0
Comment
Question by:brettawv
3 Comments
 
LVL 5

Expert Comment

by:TheNeil
ID: 2620431
Does this Registry key help any:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Unimodem\DeviceSpecific

It lists all the modems installed on your machine

The Neil
0
 

Author Comment

by:brettawv
ID: 2620713
I don't have that registry key on my machine.
0
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 2622464
hi,
please try tis someone else posted it for another question once.
it tells me the name of my installed modem and should work on all windows versions:

uses registry;

function EnumModems : TStrings;
var
  R : TRegistry;
  s : ShortString;
  N : TStringList;
  i : integer;
  j : integer;
begin
  Result:= TStringList.Create;
  R:= TRegistry.Create;
  try
    with R do begin
      RootKey:= HKEY_LOCAL_MACHINE;
      if OpenKey('\System\CurrentControlSet\Services\Class\Modem', False) then       if HasSubKeys then begin
        N:= TStringList.Create;
        try
          GetKeyNames(N);
          for i:=0 to N.Count - 1 do begin
            OpenKey(N[i], False);
            s:= ReadString('AttachedTo');
            for j:=1 to 4 do
              if Pos(Chr(j+Ord('0')), s) > 0 then
                Break;
            Result.AddObject(ReadString('DriverDesc'),TObject(j));             CloseKey;
          end;
        finally
          N.Free;
        end;
      end;
    end;
  finally
    R.Free;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.lines.AddStrings(enummodems);
end;
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question