Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

Api beep function

How can i hook a beep function which some application executes and disable her;
0
f15iaf
Asked:
f15iaf
1 Solution
 
sburckCommented:
The function MessageBeep allows you to make the system beeps.  It is an API function, available to any application, Delphi or otherwise.
0
 
intheCommented:
if you want to hook an api call you will need madshis madcodehook library and to read all you can from here:
http://help.madshi.net/Data/madCodeHook.htm

or you can look at JclPeImage from the jcl :
http://www.delphi-jedi.org/Jedi:CODELIBJCL:90332

the above is not for the faint of heart maybe easier to cut the wire to the speaker ;-)

instead of hooking his may work ok for you instead :

procedure TForm1.Button1Click(Sender: TObject);
begin //disable beep
SystemParametersInfo(SPI_SETBEEP, Word(False), nil, 0);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin  //enable beep
SystemParametersInfo(SPI_SETBEEP, Word(true), nil, 0);
end;
0
 
bengoreCommented:
Last week I read a note about hooking the PC speaker beep.
But I can not remember the details. Try to search for the sensapi.(?)
http://msdn.microsoft.com/library/en-us/synchro/hh/zaw/sensport_1jxh.asp
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now