Device Groups

When an OS/2 multimedia application needs to control more than one device at a time, it uses the MCI_GROUP message to group device contexts. The MCI_GROUP_MAKE and MCI_GROUP_DELETE flags are used to make and delete groups. MCI_GROUP_MAKE ties several device instances together so that a single command sent to the group by an application is actually sent to each device instance in the group by the multimedia system. This flag can be combined with any of the other MCI_GROUP flags except MCI_GROUP_DELETE in which case an MCIERR_FLAGS_NOT_COMPATIBLE error code is returned. Device instances must have been previously opened but can be in any mode (such as, playing, stopped, or paused) for this message to be successful. If one or more device IDs are invalid, the MCIERR_INVALID_DEVICE_ID error code is returned. If a device ID or alias refers to a device in another group, the MCIERR_ID_ALREADY_IN_GROUP error code is returned.

Once a group has been made, certain command messages sent to the group ID (or alias name) are sent to each device making up that group. Command messages that support groups are: