共用方式為


IMediaRenderer::SetVolumeAsync method (windows.media.streaming.h)

Sets the audio volume level on the DMR asynchronously to the specified value.

Syntax

HRESULT SetVolumeAsync(
  [in]  UINT32                                 volume,
  [out] ABI::Windows::Foundation::IAsyncAction **value
);

Parameters

[in] volume

A reference to the specified volume value. The value must be in the range of 0 to 100, with 0 being the minimum volume and 100 being the maximum volume.

[out] value

Receives a reference to a PlaybackOperation object that is used to get results from the asynchronous operation.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Requirements

Requirement Value
Target Platform Windows
Header windows.media.streaming.h

See also

IMediaRenderer