MODM_GETPOS

Requests that the driver return its current position in a stream of data.

MMSYSERR_NOTENABLED The driver failed to load or initialize.

dwParam1
Specifies a far pointer to an MMTIME structure (cast to a DWORD).
dwParam2
Specifies the size, in bytes, of the MMTIME structure.

The driver should return the position in the time format specified in the wType member of MMTIME. If the time format specified in wType is not supported, the driver should change wType to the default time format and return the position in that format.

Time is measured relative to the start of the first buffer that was sent in the last stopped state. The stopped state is entered whenever a MODM_OPEN, MODM_RESET, or MODM_STOP message is received. Time spent between a MODM_PAUSE and the matching MODM_RESTART is not counted, but the clock should not be reset. Likewise, time while starved for data should not be counted; the returned time should be as if the stream played perfectly with no interruptions or pauses.

The time returned if the device is paused or starved should be the time of the last event played.