Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to hook to MessageBeep system API
    primarykey
    data
    text
    <p>I've been asked by a client to solve the following pesky issue. They have a custom software that has a tendency of displaying message boxes "left and right" without any apparent reason. For instance, the software itself is an accounting program, and when they take a customer's payment, the message box may be displayed about 3 or 4 times in a row. Each message box plays Windows default sound. Unfortunately the way this software was programmed, the type of sounds it plays is completely wrong. For instance, it may display a warning message box and play the warning system sound when the message itself is just an information. All this is quite annoying for the staff who uses the software.</p> <p>I tried to contact the vendor who distributes the software, but I hit a deadend with them. So now I am looking for ways to mitigate this issue.</p> <p>My easiest solution was to suggest to mute the speakers, but unfortunately, they require sound to be present to be able to hear incoming emails, and most importantly, be able to play voice mail from them later. So my solution was to somehow mute message box sounds just for a single process.</p> <p>From my experience, I know that there're two APIs that may be producing these sounds: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms680356%28v=vs.85%29.aspx" rel="nofollow">MessageBeep</a> and an older <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms679277%28v=vs.85%29.aspx" rel="nofollow">Beep</a>.</p> <p>I also found <a href="http://www.codeproject.com/Articles/49319/Easy-way-to-set-up-global-API-hooks" rel="nofollow">this article</a> that explains how to use AppInit_DLLs to hook to system APIs. It works great, except that both of the APIs that I need to hook to come from User32.dll and not from kernel32.dll like the author suggests.</p> <p>There's also <a href="http://www.codeproject.com/Articles/49319/Easy-way-to-set-up-global-API-hooks?msg=4342850#xx4342850xx" rel="nofollow">this post</a> in the questions section that kinda gives approximate steps to hooking to an API from User32.dll, but when I tried to implement them, there's not enough information (for my knowledge to do it.)</p> <p>So my questions is, does anyone know how to hook to an API in the User32.dll module?</p> <p><strong>EDIT</strong>: PS. Forgot to mention. This software is installed on Windows 7 Professional, with UAC disabled -- because it is not compatible with UAC :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload