Commit 43b38e14 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

mshtml: Make cookie parameter optional in ConnectionPoint_Advise.

parent 1c1b1c00
......@@ -158,7 +158,8 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
}
This->sinks[i].unk = sink;
*pdwCookie = i+1;
if(pdwCookie)
*pdwCookie = i+1;
if(!i && This->data && This->data->on_advise)
This->data->on_advise(This->container->outer, This->data);
......
......@@ -4790,6 +4790,10 @@ static void test_ConnectionPoint(IConnectionPointContainer *container, REFIID ri
if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
hres = IConnectionPoint_Advise(cp, (IUnknown*)&PropertyNotifySink, &cookie);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
hres = IConnectionPoint_Unadvise(cp, cookie);
ok(hres == S_OK, "Unadvise failed: %08x\n", hres);
hres = IConnectionPoint_Advise(cp, (IUnknown*)&PropertyNotifySink, NULL);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
} else if(IsEqualGUID(&IID_IDispatch, riid)) {
hres = IConnectionPoint_Advise(cp, (IUnknown*)&EventDispatch, &cookie);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
......
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