Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: WMP Events for visualization

HTVi
TV Discussion Newsgroups

WMP Events for visualization
VizCoder 6/5/2007 4:09:01 AM
Hi, i have been working on a viz for a while now and i have just
"OnWindowMessage" used because i couldn't get the events to work (in the
"XXXevents.cpp" file).
Well does anyone know how to make it work. The code i use it from the
template for Visual Studio so it should work, i don't know what's going on.
I posted this in the visualization forum but maybe someone can help me here
Here is the code to set up the event interface:
STDMETHODIMP CViz3D::SetCore(IWMPCore * pCore) {
HRESULT hr = S_OK;

// release any existing WMP core interfaces
ReleaseCore();

// If we get passed a NULL core, this means
// that the plugin is being shutdown.
if (pCore == NULL)
return S_OK;

m_spCore = pCore;

// connect up the event interface
CComPtr<IConnectionPointContainer> spConnectionContainer;

hr = m_spCore->QueryInterface(&spConnectionContainer);

if (SUCCEEDED(hr))
hr =
spConnectionContainer->FindConnectionPoint(__uuidof(IWMPEvents),
&m_spConnectionPoint);

if (SUCCEEDED(hr)) {
hr = m_spConnectionPoint->Advise(GetUnknown(), &m_dwAdviseCookie);

if ((FAILED(hr)) || (0 == m_dwAdviseCookie))
m_spConnectionPoint = NULL;
}

return hr;
}

Can someone please help me, i would really like to implement some of those
events (like showing the song name in a cool effect when a new song is played)

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen