Tech Support > Microsoft Windows > Drivers > Making Beep from a kernel driver
Making Beep from a kernel driver
Posted by m navab on October 5th, 2007



What is the proper way for a kernel module to invoke a beep?

1) open \device\beep, Issue IOCTL_BEEP_SET

or

2) Call HalMakeBeep?

thanks
--
m navab

Posted by Tim Roberts on October 8th, 2007


m navab <mnavab@discussions.microsoft.com> wrote:
3) Call a user-mode helper app to do the dirty work.

Kernel-mode objects are not supposed to have a user interface.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Posted by Doron Holan [MSFT] on October 8th, 2007


why do you want to beep from a driver?

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"m navab" <mnavab@discussions.microsoft.com> wrote in message
news:AB819C59-A3BC-4525-85AA-9417CC1ED363@microsoft.com...

Posted by m navab on October 9th, 2007


This is a touch screen driver. A control panel let's user choose a beep
option on touch.
--
m navab


"Doron Holan [MSFT]" wrote:

Posted by Doron Holan [MSFT] on October 9th, 2007


you should use the IOCTL, HalMakeBeep is not documented but i still think
this is not a good idea. remember that not all platforms support beep.sys

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"m navab" <mnavab@discussions.microsoft.com> wrote in message
news:5F1B5C33-8F97-4A7D-B0DB-3DC650E893EE@microsoft.com...

Posted by Ben Voigt [C++ MVP] on October 9th, 2007



"m navab" <mnavab@discussions.microsoft.com> wrote in message
news:5F1B5C33-8F97-4A7D-B0DB-3DC650E893EE@microsoft.com...
That sounds like the responsibility of the application. Driver level beep
would be appropriate to indicate a fatal error which might cause the display
to stop responding (rather like POST code beep patterns).



Posted by Ray Trent on October 9th, 2007


Ben Voigt [C++ MVP] wrote:
Doing it in user mode would also simplify the task of making the setting
user-specific and allow for a wide range of possible "beep-like" sounds
such as WAV files of "clicks", calling MessageBeep, etc.

However, if all he's planning to do in the user mode app is call win32's
Beep() function, it just calls into the beep driver directly anyway, so
I don't see that there's much of a functional difference.
--
Ray


Posted by cozz in or out on October 10th, 2007


On Oct 9, 4:07 am, m navab <mna...@discussions.microsoft.com> wrote:
hi ,
that should not be difficult .. you need to use IOCTL as pointed by
'doron'.... see this How to create and communicate from kernel mode
to user mode ...
http://www.codeproject.com/system/driverdev2.asp
if that works letme know by mail ...
Kaushik


Posted by Maxim S. Shatskih on October 11th, 2007


Write a service which consume the events from the driver, and then talk to
Windows sound subsystem - WINMM or DirectSound - to make beeps.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"m navab" <mnavab@discussions.microsoft.com> wrote in message
news:5F1B5C33-8F97-4A7D-B0DB-3DC650E893EE@microsoft.com...

Posted by m navab on October 11th, 2007




I appriciate the view that this function belongs to the user land. But my
ioctl based code is very simple and has worked for over a decade. I just ran
into a problem on a 64-bit system. I guess the issue is that not all
platforms support beep. I have to find out how I can query for this feature.


--
m navab


"Maxim S. Shatskih" wrote:


Similar Posts