Internal Speaker Beep in Windows 8 Embedded Standard

♀尐吖头ヾ 提交于 2019-12-11 08:02:50

问题


I've got an industrial panel which running a 32-bit version of Windows Embedded 8 Standard. It is required to use the internal speaker to make beep sounds. Connecting external speakers is not an option.

Previously this was running XP based Windows Embedded Standard and using Console.Beep in C# will use the internal speaker. However in Windows 8 Embedded Standard this seems to use the external speakers instead, despite not being connected up.

The internal speaker is still operational - the touchscreen driver (eGalaxTouch) still uses the internal speaker when tapping the screen, however I cannot replicate this in my own application.

I've tried the following from a C# application with no effect;

Console.Beep()
MessageBeep() (user32.dll)
Beep() (kernel32.dll)
SystemSounds.Beep.Play()

I understand this is not possible from Windows 7 64-bit onwards, but I'm using 32-bit OS here and it still works with the touchscreen?

While a solution in C#/.NET would be ideal, I'd be up for other solutions (C/C++/whatever).


回答1:


Typically shortly after posting the question, I find an answer...

Basically, using the 'Beep.sys' file from the Windows (XP) Embedded Standard in place of the Windows 8 Embedded version allows Console.Beep to work as expected.

harrymc's answer to a similar question https://superuser.com/a/230167/83606 below. Note that there is no 'Beep' device in the device manager in Windows 8 (Embedded), but the procedure is otherwise similar.

From Default Beep PC Speaker changed in windows 7 – How to get back to old style :

The default beep is controlled by a driver under, c:\windows\system32\drivers\beep.sys. Maybe if you switched it out with a driver from XP/Vista it would increase the volume.

To see this driver you have to open device manager then click on View > Show hidden devices. Then under Non-Plug and Play Drivers you’ll see “Beep.” This is the driver that runs your beep. Right click on it then choose properties and go to the driver tab, then click on Driver Details… This shows the file version which looks like it’s been change with Windows 7. So replace it with an older version and see what happens.

Procedure to follow :

  1. Boot from an UBCD4WIN disc (or BartPE if you don’t have an SATA hard drive)
  2. Take ownership of the “C:\Windows\System32\Drivers\Beep.sys” file and give the local “Administrators” Group “Full Control” permissions.
  3. Rename “Beep.sys” to “Beep.old” (just in case)
  4. Copy “Beep.sys” from an XP machine to this location.


来源:https://stackoverflow.com/questions/42576225/internal-speaker-beep-in-windows-8-embedded-standard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!