Solved

Api beep function

Posted on 2001-06-30
3
330 Views
Last Modified: 2010-04-06
How can i hook a beep function which some application executes and disable her;
0
Comment
Question by:f15iaf
3 Comments
 
LVL 3

Expert Comment

by:sburck
ID: 6241413
The function MessageBeep allows you to make the system beeps.  It is an API function, available to any application, Delphi or otherwise.
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 6241725
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
 

Expert Comment

by:bengore
ID: 6244110
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now