Pc deki Yüklü Ses Aygıt listesi
15.08.2011 15:56
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,mmsystem, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
ListBox1: TListBox;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure GetWaveOutDevices(DeviceNames: TStrings);
var
DNum: Integer;
i: Integer;
Caps: TWaveOutCapsA;
begin
DNum := waveOutGetNumDevs;
for i := 0 to DNum - 1 do
begin
waveOutGetDevCaps(i, @Caps, SizeOf(TWaveOutCapsA));
DeviceNames.Add(string(Caps.szPname));
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
GetWaveOutDevices(Listbox1.Items);
end;
end.