.dll file for play sounds :
Code:
library WPSound;
uses
mmsystem;
procedure wpPlaySound(SoundFile: pchar;Loop: integer = 0); stdcall;
begin
if Loop=1 then PlaySound(SoundFile,0,SND_ASYNC or SND_LOOP)
else PlaySound(SoundFile,0,SND_ASYNC);
end;
procedure wpStopSound; stdcall;
begin
PlaySound(0,0,SND_PURGE);
end;
exports wpPlaySound, wpStopSound;
begin
end.
How to use in script? :
Code :
var
hlib : handle;
const DLLname = 'dll\wpsound.dll'; // ôàéë DLL
procedure OnCreate;
begin
hlib:=gDLL.LoadLib(DLLname);
end;
procedure OnDestroy;
begin
gDLL.FreeLib(hlib);
end;
BEGIN
gDLL.CallFunc3(hlib,'wpPlaySound',_gCustomDir+'Err or.wav',0,null);
//gDLL.CallFunc3(hlib,'wpStopSound',null,null,null);
END.
Code:
gDLL.CallFunc3(hlib,'wpPlaySound',_gCustomDir+'Err or.wav',0,null);
1 times the sound plays. if 2 to 1 on the parameters, the sound will be reproduced cyclically until the procedure call wpStopSound:
Code:
gDLL.CallFunc3(hlib,'wpStopSound',null,null,null);
For example ---->
RapidShare: Easy Filehosting