MMRESULT waveInPrepareHeader(hWaveIn, lpWaveInHdr, wSize) | |||
HWAVEIN hWaveIn; | |||
LPWAVEHDR lpWaveInHdr; | |||
UINT wSize; |
The waveInPrepareHeader function prepares a buffer for waveform input.
hWaveIn
Specifies a handle to the waveform input device.
lpWaveInHdr
Specifies a pointer to a WAVEHDR structure that identifies the buffer to be prepared.
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:
Value | Meaning |
MMSYSERR_INVALHANDLE | Specified device handle is invalid. |
MMSYSERR_NOMEM | Unable to allocate or lock memory. |
MMSYSERR_HANDLEBUSY | The handle hWaveIn is in use on another thread. |
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 will have no effect,and the function will return zero.
waveInUnprepareHeader