Partager via


IWMPGraphCreation::GraphCreationPreRender method (wmpservices.h)

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

The GraphCreationPreRender method is called by Windows Media Player before a file is rendered.

Syntax

HRESULT GraphCreationPreRender(
  [in] IUnknown *pFilterGraph,
  [in] IUnknown *pReserved
);

Parameters

[in] pFilterGraph

Pointer to the IUnknown interface of the Windows Media Player control's DirectShow filter graph.

[in] pReserved

Reserved for future use.

Return value

Return a success HRESULT to allow playback to continue or a failure code to terminate playback.

Remarks

You can call QueryInterface through pFilterGraph to retrieve the DirectShow filter graph interfaces you require.

There is no guarantee that this method will be invoked for all files. Only files rendered with DirectShow will cause this method to be invoked and the WMPGC_FLAGS_USE_CUSTOM_GRAPH flag to be honored. CD, DVD, Image, Flash, Windows Media Format SDK, and Media Foundation playback will not invoke this method.

Windows Media Player 10 Mobile: This method is not supported.

Requirements

Requirement Value
Minimum supported client Windows Media Player 10 or later
Target Platform Windows
Header wmpservices.h
DLL Wmp.dll

See also

IWMPGraphCreation Interface