## MMPM/2 Device Driver Reference

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

### VSD_SETVOLUME

Select an item:

    Syntax
    Returns
    Example Code
    Glossary

This subcommand of the VSD_SET command sets the volume level as a percentage (0 - 100). If the value is not one of the supported volume levels, it is rounded up to the nearest supported level. The ulFlags field indicates which fields are to be used.

This command is sent using VSDEntry as follows:

        VSDEntry(hvsd, ulFunc, ulFlags, pRequest)

hvsd (HVSD) Handle to a VSD.

ulFunc (ULONG) Set to VSD_SET.

ulFlags (ULONG) Set to VSD_SETVOLUME.

pRequest (PVSD_VOLUME_PARMS) Pointer to the VSD_VOLUME_PARMS structure.

The caller must fill in the ulVolume field if VSD_VOLUME is specified. The caller must fill in the ulMasterAudio field if VSD_MASTERVOLUME is specified. The caller must fill in the fMute field with a boolean if VSD_ MUTE is specified. TRUE mutes the device; FALSE unmutes the device.

rc (ULONG) Error codes indicating success or the type of failure:

VSDERR_SUCCESS The command was successful.

VSDERR_VOL_OUT_OF_RANGE Invalid volume level.