共用方式為


INSSBuffer3::GetProperty 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 GetProperty method is used to retrieve a property of 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 GetProperty(
  [in]      GUID  guidBufferProperty,
  [out]     void  *pvBufferProperty,
  [in, out] DWORD *pdwBufferPropertySize
);

Parameters

[in] guidBufferProperty

GUID value identifying the property to retrieve. 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.

[out] pvBufferProperty

Pointer to a buffer that will receive the value of the property specified by guidBufferProperty.

[in, out] pdwBufferPropertySize

Pointer to a DWORD value containing the size of the buffer pointed to by pvBufferProperty. If you pass NULL for pvBufferProperty, the method sets the value pointed to by this parameter to the size required to hold the property value. If you pass a non-NULL value for pvBufferProperty, the value pointed to by this parameter must equal 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_POINTER
pdwBufferPropertySize is NULL.
NS_E_UNSUPPORTED_PROPERTY
The property specified as guidBufferProperty is not set in this buffer object.

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::SetProperty