Play an application sound Event 
Author Message
 Play an application sound Event

I would like to play a sound associated to my application event.

I create an event "Myevent" in Windows NT registry.
Then, I use PlaySound function from Windows API. It's work fine.

    lRet = PlaySound("MyEvent", 0, SND_ALIAS + SND_ASYNC)

Now, if I create a second event "Myevent2" in Windows NT registry but
not under .Defaut App key name but under a new key "MyApp" like Explorer
does.
Below the REG file, I use to create "Myevent2" :

REGEDIT4




[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\TeleroutePC\Myevent2\.current]

Then, I use PlaySound function again. I try :
    lRet = PlaySound("MyEvent2", 0, SND_ALIAS + SND_ASYNC)
and
    lRet = PlaySound("MyApp\MyEvent2", 0, SND_ALIAS + SND_ASYNC)
and
    lRet = PlaySound("MyApp\\MyEvent2", 0, SND_ALIAS + SND_ASYNC)

It's not work (I can hear default sound instead).

What is the syntax in this case ?

Thanks in advance for yours answers.

Philippe.



Mon, 22 Jan 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Playing sounds even if other applications are playing sounds

2. Sounds - Playing System Event Sounds (asterisk, critical stop, question, etc)

3. Playing Sound file on event??!!

4. Play WAV sound on event??

5. Playing a WAV sound on a click event.

6. playing sound on events...

7. Playing Sounds from Events in Registry

8. Application That Will Record and Play Sound (real-time)

9. playing sounds in vb application

10. play sound after sound.

11. Urgent, How to: Play sound using sound card?

12. Urgent, How to: Play sound using sound card?

 

 
Powered by phpBB® Forum Software