BillP Studios

I have a pretty straight forward call that I've used for years but apparently isn't working on Vista. I've searched all the Vista development materials I could with reference to PlaySound but nothing seems to indicate I need to make a change.

What I currently have is...
PlaySound(MAKEINTRESOURCE(IDR_WOOF),hInst, SND_RESOURCE | SND_SYNC | SND_NOWAIT);

For any of you who use WinPatrol, if you have Vista you may have noticed that Scotty doesn't bark anymore when there's a change detected. The number one complaint I've had with the new WinPatrol 2007 is they miss Scotty barking. I have a new build ready for release but I would like to include a fix for this one.

Any tips or links to more information would be appreciated.


Thanks!
Bill




Re: General Windows Vista Development Issues PlaySounds fails under Vista

BillP Studios

I can't believe I couldn't get an answer to this one here. You guys have always come through before.

I can't be the only one having this problem.

I even tried calling and paying for an incident report but it took over 45 minutes for them to figure out if it should fall under me being a registered partner, Empowered ISV or just some guy off the street.

They finally wanted to send me to Vista user support not developers.

Anyone still want a challenge I have a new build going out this week.

What if I throw in a WinPatrol golf shirt Smile

Bill






Re: General Windows Vista Development Issues PlaySounds fails under Vista

Sikma

I've noticed this problem as well. I've been doing some looking, this is the only place where I've found the issue described. Have you discovered how to fix it



Re: General Windows Vista Development Issues PlaySounds fails under Vista

Jay McLain

I hate posting "me too"...but I'm hitting this with a pretty simple call to PlaySound as well.

PlaySound(szPath, NULL, SND_FILENAME | SND_ASYNC);

Funny thing is, I get a "success" response from the API, but no sound. And, yes, I've verified that the sound exists and has not changed from my XP application.





Re: General Windows Vista Development Issues PlaySounds fails under Vista

Sikma

If you don't pass in SND_ASYNC, you will get a 0 result (or at least, that's what I've observed). PlaySound will return 1 when SND_ASYNC is passed in when the sound has been put onto the queue. If you do a search on MSDN for playsound, you will find a blog that describes much of its behaviour (from one of its creators, I think).



Re: General Windows Vista Development Issues PlaySounds fails under Vista

BillP Studios

Still no answer here.

Apparently Microsoft says I don't have any incident calls left so I still haven't gotten an answer.

I can't believe more people haven't had this problem so I appreciate the "me too" 's

I'm thinking I might have to go with DirectX

Thanks,

Bill






Re: General Windows Vista Development Issues PlaySounds fails under Vista

BillP Studios

WooHoo...

I'm happy to report a solution to my PlaySound problem under Vista.

Credit goes to Larry Osterman ( http://blogs.msdn.com/larryosterman/ ) who took the time to help and acknowledged that Vista was a little more picky about the format used in WAV files.

It turns out the cbSize byte was incorrect in the WAVEFORMATEX structure. I've been using an old wav editor called CoolEdit96 and obviously I need a newer wav editing program. Modifying the wav file did the trick.

My fans of Scotty who use Vista will be very happy.

Good Luck and enjoy,

Bill Pytlovany