Compartilhar via


INSSBuffer3::SetProperty method (wmsbuffer.h)

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SetProperty method is used to specify a property for the sample in the buffer. Buffer properties are used to pass information along with the sample to the writer object when writing ASF files. Sample properties are GUID values.

Syntax

HRESULT SetProperty(
  [in] GUID  guidBufferProperty,
  [in] void  *pvBufferProperty,
  [in] DWORD dwBufferPropertySize
);

Parameters

[in] guidBufferProperty

GUID value identifying the property you want to set. The predefined buffer properties are described in the Sample Extension Types section of this documentation. You can also define your own sample extension schemes using your own GUID values.

[in] pvBufferProperty

Pointer to a buffer containing the property value.

[in] dwBufferPropertySize

DWORD value containing the size of the buffer pointed to by pvBufferProperty.

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.
E_OUTOFMEMORY
The method was unable to allocate memory for the new property.

Remarks

If you set a buffer property with a size larger than that specified in your call to IWMStreamConfig2::AddDataUnitExtension, you will not get an error from SetProperty. However, when the writer writes the sample, NS_E_DATA_UNIT_EXTENSION_TOO_LARGE will be returned.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only],Windows Media Format 9 Series SDK, or later versions of the SDK
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wmsbuffer.h (include Wmsdk.h)
Library Wmvcore.lib; WMStubDRM.lib (if you use DRM)

See also

INSSBuffer3 Interface

INSSBuffer3::GetProperty