MCI_SIGNAL

This MCI command message sets a specified position in the workspace.

Parameters

DWORD lParam1

The following flags apply to all devices supporting MCI_SIGNAL:


MCI_NOTIFY

Specifies that MCI should post the MM_MCINOTIFY message when this command completes. The window that receives this message is specified in the dwCallback field of the data structure identified by lParam2.

MCI_TEST

Queries the device to determine if it can execute the command. The device returns an error it is incapable of executing the command. It returns no error if it can handle the command. MCI returns control to the application without executing the command.

MCI_WAIT

Specifies that the operation should finish before MCI returns control to the application.

MCI_DGV_SIGNAL_AT

Specifies a signal position is included in the dwPosition field of the data structure identified by lParam2. The position value is in the current time format.

MCI_DGV_SIGNAL_EVERY

Indicates a signal period value is included in the dwEvery field of the data structure identified by lParam2. The value specifies the period for multiple signal positions and is specified in the current time format. If used with MCI_DGV_SIGNAL_AT, signals are placed throughout the workspace with one signal mark coinciding to the at position. Without MCI_DGV_SIGNAL_AT, signals are placed throughout the workspace with one signal mark placed at the current position. If this flag is omitted, only the position indicated by MCI_DGV_SIGNAL_AT is marked. If interval is less than the minimum frequency supported by a device, it will use its minimum value.

MCI_DGV_SIGNAL_USERVAL

Specifies a user-specified data value is included in the dwUserParm field of the data structure identified by lParam2. The data value is reported back with the Windows message sent by the device when it encounters a signal position. This value is also an identifier that may be used on other commands to reference this signal setting. If this item is omitted, then the default value is zero.

MCI_DGV_SIGNAL_CANCEL

Removes the signal position specified by the value associated with the MCI_DGV_SIGNAL_USERVAL flag. If a value is not specified then all signals are canceled. This flag cannot be used with the MCI_DGV_SIGNAL_AT, MCI_DGV_SIGNAL_EVERY, or MCI_DGV_SIGNAL_POSITION flags.

MCI_DGV_SIGNAL_POSITION

Specifies that the device should send the position value with the Window message instead of the user-specified value. The user-specified value is still used to cancel the signal.

LPMCI_DGV_SIGNAL_PARMS lParam2

Specifies a far pointer to the MCI_DGV_SIGNAL_PARMS structure.

Return Value

Returns zero if successful. Otherwise, it returns an MCI error code.

Comments

Signal marks remain in place until another MCI_SIGNAL command moves or disables them, or until the contents of the workspace change. Whenever the device driver presents the data at the marked position, it sends a Windows message to the application. The message identifies the device driver instance, and the user value or position. Although the window used for notify will receive the signal messages, the signal mechanism is entirely independent of the behavior of the MCI_NOTIFY and MCI_WAIT flags.