Re: using PlaySound within a dll




"stacy" <stacyirish@xxxxxxxxxxxxx> wrote in message
news:1123173926.950906.206870@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I have tried app.hInstance and I thought it must be wrong since the
> sound did not play... I guess my problem may not be the hModule
> parameter. PlaySound is returning true when I run it but I still do
> not hear anything... and yes, the sound is turned up though I'm sure I
> must be doing something equally stupid since I can't get it to work.
>
> I had read to use PlaySound and not sndPlaySound but I have tried both
> and gotten the same result.


It won't work within the IDE because the hInstance is actually that of VB.
Compile your project(s) and run those and it should work.

--
Mike
Microsoft MVP Visual Basic


.



Relevant Pages

  • Re: Beep Beep
    ... wait until it is done playing. ... while the sound continues to play. ... First, Declare PlaySound yourself, and the SND_MEMORY flag. ...
    (microsoft.public.vb.general.discussion)
  • Re: Simultaneous PlaySound
    ... However I cannot reproduce this behavior from a single process: ... PlaySound either refuses to play the second sound (SND_NOSTOP ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: .wav files on WinCE emulator using evc++4.0
    ... you can play any sound file that ... PlaySound supports, if you pass the right flags. ... sure PlaySound will play it. ... Paul G. Tobey wrote: ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: .wav files on WinCE emulator using evc++4.0
    ... The goal as of now is to make the application for WinCE emulator. ... tried using the PlaySound() function to generate a sound equivalent to ... what's the result of using the Sounds Control Panel applet to play some ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: PlaySound SND_NOSTOP doesnt work
    ... I think that when you play a sound asynchronously, the system does just that, sends it off to the bowels of the system somewhere and plays it when it gets around to it. ... Using the cout probably causes some form of synchronisation that allows your next call to operate correctly. ... I am using timers and PlaySound to play some voice messages ...
    (microsoft.public.vc.mfc)