Condividi tramite


How Properties Work

[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.]

Property values are stored in member variables.

Properties are made accessible by method pairs. One method provides the implementation to specify the property value; its name starts with put_. The other method provides the implementation to retrieve the property value; its name starts with get_. The interface definition is in Echo.idl. The property method prototypes are in Echo.h. They are implemented in Echo.cpp.

The next three sections will show you how to modify the existing property methods to suit your needs and how to add the methods for an additional property.

Echo Sample Properties