Поделиться через


IWMHeaderInfo::GetMarker method (wmsdkidl.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 GetMarker method returns the name and time of a marker.

Syntax

HRESULT GetMarker(
  [in]  WORD  wIndex,
  [out] WCHAR *pwszMarkerName,
  [in]  WORD  *pcchMarkerNameLen,
  [out] QWORD *pcnsMarkerTime
);

Parameters

[in] wIndex

WORD containing the index.

[out] pwszMarkerName

Pointer to a wide-character null-terminated string containing the marker name.

[in] pcchMarkerNameLen

On input, a pointer to a variable containing the length of the pwszMarkerName array in wide characters (2 bytes). On output, if the method succeeds, the variable contains the actual length of the name, including the terminating null character. To retrieve the length of the name, you must set this to zero and set pwszMarkerName and pcnsMarkerTime to NULL.

[out] pcnsMarkerTime

Pointer to a variable specifying the marker time in 100-nanosecond increments.

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.
ASF_E_BUFFERTOOSMALL
The size specified by pcchMarkerNameLen is too small to receive the name.
NS_E_INVALID_STATE
The object is not in a configurable state.
E_INVALIDARG
pcchMarkerNameLen is NULL, or another parameter does not contain a valid value.
E_UNEXPECTED
The method failed for an unspecified reason.

Remarks

The writer does not support markers, and returns E_NOTIMPL when this method is called.

Requirements

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

See also

IWMHeaderInfo Interface

IWMHeaderInfo2

IWMHeaderInfo3

IWMHeaderInfo::AddMarker

IWMHeaderInfo::GetMarkerCount

IWMHeaderInfo::RemoveMarker

Markers