Did a quick google to try and get more info and came across this almost immediately. The next to last post by MikeD is interesting. Besides the rant, he mentions having the resource type as "WAVE". I've used "SOUND" and "WAVE" with identical results (not tried B*LL*CKS - yetEdit: doesn't work
). Another little bit is the addition of "&" after "101" specifying a Long. Again identical results. (nudge.wav played from a res is still problematic) It seems that different Win OS's, wave files and setups give differing results
. (eg. "...it works ok on MY pc...") I've posted the same PlaySound code here several times with positive results.
Do you have a large, say 1MB, NON-MS .wav you could put in the res to try? It *seems* the bigger the file, the more reliable playback is.
Other than this I can only suggest creating temporary files from the res and playing them from HDD. (Or just using wav files on the HDD). I don't know if it'll suit your purposes, but there's an app I put in the codebank "mciSendString - audio/video playback..." in my signature that does that. It's a tad more complex than the one liner "PlaySound", but could be stripped down/adapted to suit.




Edit: doesn't work
. (eg. "...it works ok on MY pc...") I've posted the same PlaySound code here several times with positive results.
Reply With Quote