determine buffer of MM_WIM_DATA with lParam?

i read that the lParam of a MM_WIM_DATA message is the address of the header for the buffer reported as filled.


can someone *please* illustrate a method of using this? i've tried casting, all sorts of things, and all return zero.

i can print lParam on the screen and see eight values when i use eight addresses. i tried storing them as INTS but they won't match.

i tried this:
for (i = 0; i < BUFFERS; i++) if (&MyWavInHdr[i] == lParam) happy = true;

but it is never true.

maybe there is something i don't know, but it would make a lot of difference as this is a present for my niece's birthday party tomorrow.
lParam is a pointer to a WAVEHDR structure. The buffer itself is contained in lpData member of this structure:
1
2
3
PWAVEHDR waveHdr;
waveHdr = (WAVEHDR *)lParam;
// waveHdr->lpData is the buffer  
Registered users can post here. Sign in or register to post.