MCI_STEP
Appearance
This message is sent to step the player and is intended primarily for videodisc players. The step can be performed in either forward or reverse directions.
Syntax
param1 ULONG ulParam1; /* Message flags. */ param2 PMCI_STEP_PARMS pParam2; /* Pointer to step structure. */
Parameters
- ulParam1 (ULONG) - input
- This parameter can contain any of the following flags:
- * MCI_NOTIFY — A notification message will be posted to the window specified in the `hwndCallback` field of the `pParam2` structure when the action completes or an error occurs.
- * MCI_WAIT — Control is not returned until the action is completed or an error occurs.
- * MCI_STEP_FRAMES — Used to set a specific number of frames to step. The increment is specified in the `ulStep` field of the MCI_STEP_PARMS structure.
- * MCI_STEP_REVERSE — Sets the step direction to reverse.
- pParam2 (PMCI_STEP_PARMS) - input
- A pointer to the MCI_STEP_PARMS data structure.
Return Value
- rc (ULONG)
- Return codes indicating success or type of failure:
- * MCIERR_SUCCESS — 0 is returned if the function succeeds.
- * MCIERR_INVALID_DEVICE_ID — The device ID is not valid.
- * MCIERR_INSTANCE_INACTIVE — The device ID is currently inactive. Issue MCI_ACQUIREDEVICE to make it active.
- * MCIERR_MISSING_FLAG — A required flag is missing.
- * MCIERR_UNSUPPORTED_FLAG — Given flag is unsupported for this device.
- * MCIERR_INVALID_CALLBACK_HANDLE — Given callback handle is invalid.
- * MCIERR_HARDWARE — Device hardware error.
- * MCIERR_UNSUPPORTED_FUNCTION — Unsupported function.
- * MCIERR_INVALID_FLAG — Flag is invalid (`ulParam1`).
- * MCIERR_FLAGS_NOT_COMPATIBLE — Flags cannot be used together.
- * MCIERR_INVALID_ITEM_FLAG — Invalid status item flag given.
- * MCIERR_MISSING_ITEM — Missing status item flag.
- * MCIERR_MISSING_PARAMETER — Required parameter is missing.
Remarks
- If no flags are specified, MCI_STEP defaults to stepping one frame forward.
- If only the MCI_STEP_REVERSE flag is specified, the device steps one frame backward.
- **Caution:** If using an application-defined window on a system without direct-access device driver support for motion video, do not issue MCI_STEP with the MCI_WAIT flag unless the thread issuing the message is separate from the thread reading the message queue.
Related Messages
Example Code
The following code illustrates how to step a player forward by 10 frames.
USHORT usDeviceID;
MCI_STEP_PARMS mstepp;
/* Step the device 10 frames */
/* Assumes time format for device is set to frames */
mstepp.ulStep = (ULONG) 10;
mciSendCommand( usDeviceID, /* Device ID */
MCI_STEP, /* MCI step message */
MCI_WAIT | MCI_STEP_FRAMES,
/* Flags for this message */
(PVOID) &mstepp, /* Data structure */
0); /* No user parm */