Forum: PC Hard- und Software MessageBeep(0); does not work under service program on Vista


von Sabine (Gast)


Lesenswert?

MessageBeep(0); does  not work under service program on Vista
Unter RegEdit
USER\Control Panel\Sound\Beep set to "yes".
habe ich schon nachgeschaut.

Auch der simple Beep() für Visual Basic Express geht nicht.

Im Internet habe ich was dazu gefunden.

I've had the problem on two machines: one Windows XP Pro and one
Windows 2000 Pro.
I've already found out that on Windows XP machine I've had somehow
USER\Control Panel\Sound\Beep set to "no". I don't know how this has
happened (it's my machine and I haven't even knew about this setting
so far). I've changed it to "yes" by hand, rebooted and it works now.
On Windows 2000 machine on the other hand this setting is set to "yes"
already. It doesn't work anyway, so there must be something else.
I've changed our program that had the problem (it is
hardware+software, it has to beep to let user know that something had
happened and he has to look at PC monitor) to use Beep instead of
MessageBeep(-1) and it works now.
I still don't know what has changed registry setting on my machine
and why doesn't it work on the other one, but that's not important
for me anymore.

I have similar things happening to me from time to time.
Installation programs do weird things.
A while back I got no sound out when I tried to play CDs.
There was some Registry setting that was stopping it,
but I have no idea what caused the Registry change.

von Rufus Τ. F. (rufus) Benutzerseite


Lesenswert?

Die Win32-API-Funktion Beep steuert immer die PC-Lautsprecherhardware 
an, MessageBeep aber spielt den dem übergebenen Parameter zugeordneten 
Systemklang über die Soundhardware ab.

Daher verhalten sich beide Funktionen grundverschieden, was das 
Verhalten erklären dürfte.

Beep gibt es unter Vista und der 64-Bit-Version von Windows XP nicht 
mehr.

Davon abgesehen ist für die korrekte Ausführung von Beep der Dienst 
("Service") beep zuständig, der mit
1
net stop beep
 beendet werden kann, was die Tonausgabe unterbindet.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.