MODM_GETPOS - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// mmddk.h

DWORD modMessage(
   UINT      uDeviceID,
   UINT      uMsg,
   DWORD_PTR dwUser,
   DWORD_PTR dwParam1,
   DWORD_PTR dwParam2
);
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (modm-getpos)

MODM_GETPOS function

WINMM sends the MODM_GETPOS message to the modMessage function of a MIDI output driver to request the current position of the stream pointer in the data stream.

Parameters

Return value

The modMessage function returns MMSYSERR_NOERROR if the operation is successful. Otherwise, it returns MMSYSERR_NOTENABLED to indicate that the driver failed to load or initialize.

Remarks

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 must 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 while the driver was 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, the time during which the driver is starved for data must not be counted; the returned time must be as if the stream played perfectly with no interruptions or pauses.

If the device is paused or starved, the time returned must be the time of the last event played.

Requirements

Target platform Desktop
Version Available in Windows XP and later Windows operating systems.
Header Mmddk.h (include Mmddk.h, Mmsystem.h, or Windows.h)

See also

modMessage

MMTIME

MODM_OPEN

MODM_RESET

MODM_STOP

MODM_PAUSE

MODM_RESTART