waveOutGetPosition

Syntax

WORD waveOutGetPosition(hWaveOut, lpInfo, wSize)

This function retrieves the current playback position of the specified waveform output device.

Parameters

HWAVEOUT hWaveOut

Specifies a handle to the waveform output device.

LPMMTIME lpInfo

Specifies a far pointer to an MMTIME structure.

WORD wSize

Specifies the size of the MMTIME structure.

Return Value

Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:

MMSYSERR_INVALHANDLE

Specified device handle is invalid.

Comments

Before calling waveOutGetPosition, set the wType field of the MMTIME structure to indicate the time format that you desire. After calling waveOutGetPosition, check the wType field to determine if the desired time format is supported. If the desired format is not supported, wType will specify an alternative format.

The position is set to zero when the device is opened or reset.