Thread View: comp.archives.ms-windows.discuss
4 messages
4 total messages
Started by Yurij Nykon
Thu, 13 Jul 2000 00:00
How to determine if the soundcard is installed on my computer?
Author: Yurij Nykon
Date: Thu, 13 Jul 2000 00:00
Date: Thu, 13 Jul 2000 00:00
8 lines
1296 bytes
1296 bytes
I want to know where in Windows registry is stored the value whether the soundcard on my computer is installed. I had to check this value from macromedia Director, but I don't know where can I find thist value in registry Thank you in advance Yurij
Re: How to determine if the soundcard is installed on my computer?
Author: Jason McClain
Date: Thu, 13 Jul 2000 00:00
Date: Thu, 13 Jul 2000 00:00
24 lines
1653 bytes
1653 bytes
Using the registry is a very bad idea.... all kinds of false values can pop up..plus if a card WAS installed and removed later it's still going to be listed if it's drivers are not uninstalled.... the easiest thing to do is this uses mmsystem; function IsThereAWaveCompatibleDevice:Boolean; begin Result := WaveOutGetNumDevs >0; end; function IsThereAMidiCompatibleDevice:Boolean; begin Result := MidiOutGetNumDevs >0; end; If it's true, there's a device in the system....plain and simple Jason McClain Magnum Studios
Re: How to determine if the soundcard is installed on my computer?
Author: M.H. Avegaart
Date: Thu, 13 Jul 2000 00:00
Date: Thu, 13 Jul 2000 00:00
71 lines
2660 bytes
2660 bytes
This procedure to get a list of installed hardware might help:
ps. On Delphi versions < 4 you have to replace OpenKeyReadOnly(...) with
OpenKey(..., False).
uses
Registry;
procedure GetHardwareList(List: TStrings);
var
S: TStrings;
R: TRegistry;
i: Integer;
begin
S := TStringList.Create;
try
R := TRegistry.Create;
try
R.RootKey := HKEY_DYN_DATA;
if R.OpenKeyReadOnly('Config Manager\Enum') then
try
R.GetKeyNames(S);
finally
R.CloseKey;
end;
for i := 0 to S.Count - 1 do
if R.OpenKeyReadOnly('Config Manager\Enum\' + S[i]) then
try
try
S[i] := R.ReadString('HardWareKey');
except
end;
finally
R.CloseKey;
end;
R.RootKey := HKEY_LOCAL_MACHINE;
List.Clear;
for i := 0 to S.Count - 1 do
if R.OpenKeyReadOnly('Enum\' + S[i]) then
try
try
List.Add(R.ReadString('Class') + ': ' +
R.ReadString('DeviceDesc'));
except
end;
finally
R.CloseKey;
end;
finally
R.Free;
end;
finally
S.Free;
end;
end;
"Yurij Nykon" <ynykon@ipm.lviv.ua> schreef in bericht
news:396DCDC3.E0D024E6@ipm.lviv.ua...
> I want to know where in Windows registry is stored the value whether the
>
> soundcard on my computer is installed.
> I had to check this value from macromedia Director, but I don't know
> where can I find thist value in registry
>
> Thank you in advance
> Yurij
>
>
>
>
Re: How to determine if the soundcard is installed on my computer?
Author: o-u-t-s-i-d-e
Date: Thu, 13 Jul 2000 00:00
Date: Thu, 13 Jul 2000 00:00
7 lines
1450 bytes
1450 bytes
Why do you always use the registry to get those values? Always try to avoid reading the registry... It might even change in the future. There is some API called GetWaveOutputDevices or something like that. Don't know for sure if this is the right function, but you have to search the libraries for the correct name. Or it's in some kind of mm .DLL.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads