Implementing CSearch
[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 IWMPPluginUI interface has several methods that are called by Windows Media Player at different times during the life cycle of a plug-in instance. The wizard provides basic implementations of these methods as well as the class constructor and destructor and other class methods. The Search.h file must be modified so that Windows Media Player can communicate with the UI, which is described in the next section.
For the CPluginWindow class to have access to the private member variable m_spCore, a friend class declaration must be made inside the CSearch class definition as shown in the following code snippet:
class ATL_NO_VTABLE CSearch :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CSearch, &CLSID_Search>,
public IWMPPluginUI
{
friend class CPluginWindow;
// Rest of class definition...
}
Related topics