检测声卡是否安装的code怎么写?(0分)

  • 主题发起人 主题发起人 flyso
  • 开始时间 开始时间
F

flyso

Unregistered / Unconfirmed
GUEST, unregistred user!
检测声卡是否安装的code怎么写?请指点
 
利用mci open 没装会返回
 
怎么写?
 
if (waveOutGetNumDevs > 0) then 有声卡
else 没有
 
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,shellapi;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}




procedure TForm1.Button1Click(Sender: TObject);
begin
if (waveOutGetNumDevs > 0) then
ShowMessage('声卡已经安装!')
else
ShowMessage('声卡没有安装!');
end;

end.


提示错误:
[Error] Unit1.pas(31): Undeclared identifier: 'waveOutGetNumDevs'
[Warning] Unit1.pas(31): Comparing signed and unsigned types - widened both operands
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'

请问怎么解决
 
uses mmsystem;

 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部