How to check if a sound card is installed or not.
This tip is not my own, it was sent to me via email.
function IsSoundCardInstalled : Boolean;
type
SCFunc = function : UInt; stdcall;
var
LibInst : LongInt;
EntryPoint : SCFunc;
begin
Result := False;
LibInst := LoadLibrary(PChar('winmm.dll'));
try
If LibInst <> 0 then
begin
EntryPoint := GetProcAddress(LibInst, 'waveOutGetNumDevs');
if (EntryPoint <> 0) then Result := True;
end;
finally
if (LibInst <> 0) then FreeLibrary(LibInst);
end;
end;