Re: using PlaySound within a dll
- From: Tom Esh <tjeshGibberish@xxxxxxxxxx>
- Date: Thu, 04 Aug 2005 15:12:38 -0400
On 4 Aug 2005 10:12:06 -0700, "stacy" <stacyirish@xxxxxxxxxxxxx>
wrote:
Problem is your declarations for the lpszSound arg do not match the
data type being passed. If it helps, I use this one. (Just have to
remember to pass ByVal when specifying a string or res ID in
lpszSound):
Public Declare Function PlaySoundAny Lib "winmm.dll" _
Alias "PlaySoundA" _
(lpSound As Any, ByVal hModule As Long, _
ByVal dwFlags As Long) As Long
'usage:
Dim DataArray() As Byte
DataArray = LoadResData(101, "WAVE")
PlaySoundAny DataArray(0), 0, _
SND_MEMORY Or SND_NODEFAULT Or SND_ASYNC
If that doesn't work, check to make sure your DataArray is actually
being populated (iow you're not passing a bad resID or type to
LoadResData).
-Tom
MVP - Visual Basic
(please post replies to the newsgroup)
.
- Follow-Ups:
- Re: using PlaySound within a dll
- From: stacy
- Re: using PlaySound within a dll
- References:
- using PlaySound within a dll
- From: stacy
- Re: using PlaySound within a dll
- From: Ken Halter
- Re: using PlaySound within a dll
- From: stacy
- Re: using PlaySound within a dll
- From: Bob Butler
- Re: using PlaySound within a dll
- From: stacy
- Re: using PlaySound within a dll
- From: MikeD
- Re: using PlaySound within a dll
- From: stacy
- using PlaySound within a dll
- Prev by Date: Re: Save file Dialog API question
- Next by Date: Re: using PlaySound within a dll
- Previous by thread: Re: using PlaySound within a dll
- Next by thread: Re: using PlaySound within a dll
- Index(es):