Commit 2d454641 authored by Damien Fouilleul's avatar Damien Fouilleul

- activex: misc fixes for properties and events sinks

parent ebf11a99
......@@ -36,6 +36,8 @@ struct VLCEnumConnectionsDereference
{
CONNECTDATA cd;
i->second->AddRef();
cd.dwCookie = i->first;
cd.pUnk = i->second;
return cd;
......@@ -115,12 +117,13 @@ STDMETHODIMP VLCConnectionPoint::Advise(IUnknown *pUnk, DWORD *pdwCookie)
if( (NULL == pUnk) || (NULL == pdwCookie) )
return E_POINTER;
pUnk->AddRef();
if( SUCCEEDED(pUnk->QueryInterface(_iid, (LPVOID *)&pUnk)) )
{
*pdwCookie = ++dwCookieCounter;
_connections[*pdwCookie] = pUnk;
return S_OK;
}
return CONNECT_E_CANNOTCONNECT;
};
STDMETHODIMP VLCConnectionPoint::Unadvise(DWORD pdwCookie)
......@@ -157,7 +160,7 @@ void VLCConnectionPoint::fireEvent(DISPID dispId, DISPPARAMS *pDispParams)
if( NULL != pUnk )
{
IDispatch *pDisp;
if( SUCCEEDED(pUnk->QueryInterface(IID_IDispatch, (LPVOID *)&pDisp)) )
if( SUCCEEDED(pUnk->QueryInterface(_iid, (LPVOID *)&pDisp)) )
{
pDisp->Invoke(dispId, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, pDispParams, NULL, NULL, NULL);
pDisp->Release();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment