大侠们帮我看看,谢谢了!procedure TForm1.Button1Click(Sender: TObject);
var
data: AnsiChar;
i,j,k:integer;
DLLHandle: THandle;
open_sound_card: Function(sample,ch: integer):integer;
ReadSound: Function(pBuf: char; bufsize: integer):integer;
close_sound_card: TFarproc;
WriteSound: TFarproc;
begin
DLLHandle:=LoadLibrary('GetAudio.dll');
if DLLHandle<>0 then
begin
try
@open_sound_card:=GetProcAddress(DLLHandle, 'open_sound_card');
@ReadSound:=GetProcAddress(DLLHandle, 'ReadSound');
close_sound_card:=GetProcAddress(DLLHandle, 'close_sound_card');
WriteSound:=GetProcAddress(DLLHandle, 'WriteSound');
if Assigned(@open_sound_card) then
begin
i:=open_sound_card(8000,2);
j:=ReadSound(data,sizeof(data));
showmessage(inttostr(j));
end;
finally
showmessage('Error!');
FreeLibrary(DLLHandle);
end;
end;
var
data: AnsiChar;
i,j,k:integer;
DLLHandle: THandle;
open_sound_card: Function(sample,ch: integer):integer;
ReadSound: Function(pBuf: char; bufsize: integer):integer;
close_sound_card: TFarproc;
WriteSound: TFarproc;
begin
DLLHandle:=LoadLibrary('GetAudio.dll');
if DLLHandle<>0 then
begin
try
@open_sound_card:=GetProcAddress(DLLHandle, 'open_sound_card');
@ReadSound:=GetProcAddress(DLLHandle, 'ReadSound');
close_sound_card:=GetProcAddress(DLLHandle, 'close_sound_card');
WriteSound:=GetProcAddress(DLLHandle, 'WriteSound');
if Assigned(@open_sound_card) then
begin
i:=open_sound_card(8000,2);
j:=ReadSound(data,sizeof(data));
showmessage(inttostr(j));
end;
finally
showmessage('Error!');
FreeLibrary(DLLHandle);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货