다음을 통해 공유


IWMPEvents3::StringCollectionChange method (wmp.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 StringCollectionChange event occurs when a string collection changes.

Syntax

void StringCollectionChange(
  [in] IDispatch                          *pdispStringCollection,
  [in] WMPStringCollectionChangeEventType change,
  [in] long                               lCollectionIndex
);

Parameters

[in] pdispStringCollection

Pointer to the IDispatch interface that represents the string collection that changed. Call QueryInterface to retrieve a pointer to IWMPStringCollection.

[in] change

WMPStringCollectionChangeEventType value indicating the type of change that occurred.

[in] lCollectionIndex

The index of the string collection item that changed.

Return value

None

Remarks

To receive StringCollectionChange events, you must obtain your string collection as follows:

  1. Call IWMPLibrary::get_mediaCollection to get an IWMPMediaCollection interface.
  2. Call the getAttributeStringCollection method of the interface you obtained in step 1.
If you obtain your IWMPMediaCollection interface by calling IWMPCore::get_mediaCollection, you will not receive StringCollectionChange events.

You can also handle this event through an IDispatch event sink by using the _WMPOCXEvents interface.

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

Requirements

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

See also

IWMPEvents3 Interface

IWMPStringCollection Interface

_WMPOCXEvents Interface