다음을 통해 공유


IWMPUserEventSink::NotifyUserEvent 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 NotifyUserEvent method notifies an application of an event generated by a custom video presenter that the application provided to the Enhanced Video Renderer (EVR).

Syntax

HRESULT NotifyUserEvent(
  [in] long EventCode
);

Parameters

[in] EventCode

An event code that is meaningful only to the application and the custom video renderer. The event code must have a value greater than or equal to WMPUE_EC_USER, which is defined in wmpservices.h.

Return value

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

Value Description
S_OK The method succeeded.

Remarks

An application that embeds the Windows Media Player control can provide a custom video renderer for the EVR by calling IWMPVideoRenderConfig::put_presenterActivate. As the custom video renderer runs, it can notify the EVR of events by calling IMediaEventSink::Notify. If the event code supplied by the custom video renderer is greater than or equal to WMPUE_EC_USER, the EVR passes the event notification along to the application by calling NotifyUserEvent.

The definition of WMPUE_EC_USER depends on the definition of EC_USER, which is defined in evcode.h.

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

Requirements

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

See also

IWMPUserEventSink Interface