Share via


IWMPContentPartner::StationEvent method (contentpartner.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.]

Note  This section describes functionality designed for use by online stores. Use of this functionality outside the context of an online store is not supported.
 
The StationEvent method notifies the plug-in of events during playback of a Windows Media metafile playlist (ASX file).

Syntax

HRESULT StationEvent(
  [in] BSTR  bstrStationEventType,
  [in] ULONG StationId,
  [in] ULONG PlaylistIndex,
  [in] ULONG TrackID,
  [in] BSTR  TrackData,
  [in] DWORD dwSecondsPlayed
);

Parameters

[in] bstrStationEventType

BSTR containing the event type. The caller (Windows Media Player) sets this parameter to one of the following values.

String Description
g_szStationEvent_Started A track started playing.
g_szStationEvent_Complete A track finished playing.
g_szStationEvent_Skipped A track was skipped.

[in] StationId

The station ID.

[in] PlaylistIndex

The playlist index.

[in] TrackID

The track ID.

[in] TrackData

BSTR containing track data.

[in] dwSecondsPlayed

Number of seconds that the playlist was played.

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.

Remarks

This method is called to enable logging of certain ASX events when an ASX file created by the online store is played.

Requirements

Requirement Value
Minimum supported client Windows Media Player 11
Target Platform Windows
Header contentpartner.h

See also

IWMPContentPartner Interface

Windows Media Metafiles Overview