Setting position-change advise causes MM_MCIPOSITIONCHANGE messages to be returned to the application whenever the specified media position is reached. The window handle specified in the hwndCallback field of MCI_POSITION_PARMS receives the MM_MCIPOSITIONCHANGE messages. When setting position advise on, a valid window handle must be specified in the hwndCallback field. An error is returned if a NULL or invalid window handle is specified.

Only one position-change advise message frequency can be specified; that is, setting a new frequency for position-change advise messages replaces the previously set position-change advise request.

A device element must be loaded before position advise can be set, and is reset when a new device element is loaded. Devices that do not perform their own event detection might have less accurate position-advise events.

Position advise messages are only generated during playback or recording, not during seek operations.

If MCI_SET_POSITION_ADVISE_OFF is specified ulUnits is ignored; otherwise, if the ulUnits field contains 0, the error MCIERR_OUTOFRANGE is returned.

If the length of a file cannot be determined, MCIERR_SUCCESS might be returned if ulUnits is out of range, and no MM_MCIPOSITIONCHANGE messages are generated.


[Back] [Next]