Group:  English: Entertainment ยป microsoft.public.windowsmedia.player.visualizations
Thread: WMP Events

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

WMP Events
VizCoder 05.06.2007 00:45:00
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.
Here is the code to set up the event interface:
[CODE]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;
}[/CODE]
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