Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10473

Re: Can't Play system sounds

$
0
0

I think I've found the problem:

If you want to play a system sound (not a wav file) this function doesn't need a string containing the ID of the sound you want to play, but a pointer to a string containing that ID.

So, from PB, this call is wrong:

PlaySoundW("18515", ll_null, SND_ALIAS_ID)

 

In c++ the correct call is:

PlaySoundW((LPCWSTR)SND_ALIAS_SYSTEMEXCLAMATION, NULL, SND_ALIAS_ID);


SND_ALIAS_SYSTEMEXCLAMATION is not converted to string, but to a "long pointer to string".

I don't know if it is possible to make this call from PB.

To solve this problem I had to make a dll in c++ that wraps these calls


Viewing all articles
Browse latest Browse all 10473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>