Jump to content


Photo

PInvoke to handle events

- - - - -

  • Please log in to reply
No replies to this topic

#1
Massif

Massif

    Newbie

  • Members
  • Pip
  • 4 posts
I managed to get midi playback working on WM6 using SndPlayAsync. Now I would like to be able to loop the midi. The only way I can see to do this is to detect when the file stops playing and play it again. I believe I might be able to detect the event using SndGetWaitHandle, but I don't know what to do with the event handle once it's retrieved.

[DllImport("aygshell.dll")]
static extern uint SndGetWaitHandle(IntPtr hSound, ref IntPtr phDoneEvent);

Can anyone tell me how to set up an event handler for this kind of event handle? Or if there is an easier way to loop the midi, that would be preferable.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users