Re: using PlaySound within a dll

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 4 Aug 2005 15:02:32 -0700, "stacy" <stacyirish@xxxxxxxxxxxxx>
wrote:

>Yes, simplification includes using the PlaySoundLong function... it
>seems to be easier to call. In response to the post before, yes the
>sound is wave sound. I can hear it when I call PlaySoundLong in an exe
>but not when I put PlaySoundLong in a dll. Yes, I am already hating
>myself for what I know must be something really dumb - but I do have
>the speakers on and the sound a-blasting.

This is strange. Just tried it (playing a sound resource from a dll)
to verify my assumptions and it works as expected. Almost makes me
think it's something really lame - like a corrupted res file or
mis-matched res ID or type ID. Then again, you said it worked from an
ordinary exe, so I dunno... You sure the dll was built with the res
file?


-Tom
MVP - Visual Basic
(please post replies to the newsgroup)
.



Relevant Pages

  • Re: using PlaySound within a dll
    ... simplification includes using the PlaySoundLong function... ... In response to the post before, ... > sound is wave sound. ... Public Sub MySound() ...
    (microsoft.public.vb.winapi)
  • Re: using PlaySound within a dll
    ... simplification includes using the PlaySoundLong function... ... In response to the post before, ... sound is wave sound. ...
    (microsoft.public.vb.winapi)
  • SetNotificationPositions returns E_OUTOFMEMORY?
    ... I've been working on an application to play sounds at a user-specified ... I've been able to make a .dll ... to Play the sound again. ... the .exe that includes the .dll to wait for the event. ...
    (microsoft.public.win32.programmer.directx.audio)
  • RE: Lost sound
    ... I was able to get rid of the dll error message another posting. ... get blue screen and the auto reboot. ... Uninstalled drivers for sound card and pulled card out. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Beep Beep
    ... I notice when using your code that calling the sound does not wait ... is that it will result in no sound playing for a brief period. ... Is there anything within the DLL that could optionally keep code from ...
    (microsoft.public.vb.general.discussion)