MCISTRNG - Media Control Interface String Test Sample

The String Test Sample serves as a powerful testing and debugging tool that enables developers writing media drivers to control their devices at the application level. The String Test Sample illustrates how an application uses the interpretive string interface provided by the media control interface. It also illustrates how notification messages are returned from the media drivers to the application.

The media control interface of OS/2 multimedia provides the primary mechanism for application control of media devices. Applications interface with the media control interface (and thus with media devices) in two ways-through a procedural interface or through a string interface. The procedural interface (also referred to as command message interface) is used for sending messages to the media control interface from an application using the mciSendCommand function. The string interface is used for sending command language statements to the media control interface from an application using the mciSendString function.

The string interface has a few advantages over the procedural interface. First, the string interface enables you to interactively control devices with a PM or command line interface. In addition, applications that currently use script languages can integrate "string commands" in their script languages allowing you to integrate multimedia in your applications with a very low cost and development impact. Finally, in certain programming circumstances, the string interface is also easier to use than the procedural interface. The string interface simply passes a character-string buffer to the function, in contrast to the procedural interface, which requires the setup of certain data structures.

Note: The procedural interface is illustrated in the Duet Samples.