WORD waveOutPrepareHeader(hWaveOut, lpWaveOutHdr, wSize)
This function prepares a waveform data block for playback.
HWAVEOUT hWaveOut
Specifies a handle to the waveform output device.
LPWAVEHDR lpWaveOutHdr
Specifies a pointer to a WAVEHDR structure that identifies the data block to be prepared.
WORD wSize
Specifies the size of the WAVEHDR structure.
Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:
MMSYSERR_INVALHANDLE
Specified device handle is invalid.
MMSYSERR_NOMEM
Unable to allocate or lock memory.
The WAVEHDR data structure and the data block pointed to by its lpData field must be allocated with GlobalAlloc using the GMEM_MOVEABLE and GMEM_SHARE flags, and locked with GlobalLock. Preparing a header that has already been prepared has no effect, and the function returns zero.
waveOutUnprepareHeader