## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### VSD_DDCMD

Select an item:

    Syntax
    Returns
    Remarks
    Glossary

Stream handlers can communicate to their attached devices using the VSD_ DDCMD call. The DDCMD interface is the primary method of moving data to and from devices in OS/2 multimedia. See the OS/2 Multimedia Programming Reference for more detailed information on stream handler command (SHC) messages.

This command is sent using VSDEntry as follows:

        VSDEntry(hvsd, ulFunc, ulFlags, pRequest)

hvsd (HVSD) Handle to a VSD.

ulFunc (ULONG) Set to VSD_DDCMD.

ulFlags (ULONG) The following flags (subcommands) are defined for this command:

DDCMD_CONTROL This subcommand of VSD_DDCMD performs a device-specific command. pRequest is a pointer to the DDCMDCONTROL structure.

DDCMD_DEREG_STREAM This subcommand of VSD_DDCMD deregisters a stream instance with the device driver. pRequest is a pointer to DDCMDDEREGISTER structure.

DDCMD_READ This subcommand of VSD_DDCMD is used by a stream handler to give an empty buffer to the VSD (for example, during a record operation). When the buffer has been filled, the VSD is responsible for communicating to the caller that the buffer has been filled. The VSD should pass a MSG_ REPORTINT structure to the pSHDEntryPoint in DDCMDREGISTER to inform the caller.

pRequest is a pointer to DDCMDREADWRITE structure.

DDCMD_REG_STREAM This subcommand of VSD_DDCMD registers a stream instance with the device driver. pRequest is a pointer to DDCMDREGISTER structure.

DDCMD_SETUP This subcommand of VSD_DDCMD performs device-specific stream instance setup. pRequest is a pointer to DDCMDSETUP structure.

DDCMD_STATUS This VSD subcommand requests streaming status from a device. Typically, it is called to request the current stream time. pRequest is a pointer to DDCMDSTATUS structure.

DDCMD_WRITE This VSD subcommand is used by a stream handler to give a full buffer to the VSD (for example, during a playback operation). When the buffer has been consumed, the VSD is responsible for communicating to the caller that the buffer has been used. The VSD should pass a MSG_REPORTINT structure to the pSHDEntryPoint in DDCMDREGISTER to inform the caller.

pRequest is a pointer to DDCMDREADWRITE structure.

pRequest (PVOID) The value of pRequest varies according to the ulFlags value. See each particular ulFlags value for the definition of pRequest.

rc (ULONG) Possible error codes vary according to the value of ulFlags.