Commit 088192a9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ieframe: Fixed invalid COM object usage.

parent 491e84a7
......@@ -3842,43 +3842,24 @@ static void test_FileProtocol(void)
DeleteFileA(file_path);
}
struct sink
{
IAdviseSink IAdviseSink_iface;
};
static inline struct sink *impl_from_IAdviseSink(IAdviseSink *iface)
{
return CONTAINING_RECORD(iface, struct sink, IAdviseSink_iface);
}
static HRESULT WINAPI sink_QueryInterface( IAdviseSink *iface, REFIID riid, void **obj)
{
struct sink *sink = impl_from_IAdviseSink(iface);
trace("%p, %p, %p\n", iface, riid, obj);
if (IsEqualGUID(riid, &IID_IAdviseSink) || IsEqualGUID(riid, &IID_IUnknown))
{
*obj = &sink->IAdviseSink_iface;
}
else
{
return E_NOINTERFACE;
if (IsEqualGUID(riid, &IID_IAdviseSink) || IsEqualGUID(riid, &IID_IUnknown)) {
*obj = iface;
return S_OK;
}
IAdviseSink_AddRef(iface);
return S_OK;
ok(0, "unexpected call QI(%s)\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
static ULONG WINAPI sink_AddRef(IAdviseSink *iface)
{
trace("%p\n", iface);
return 2;
}
static ULONG WINAPI sink_Release(IAdviseSink *iface)
{
trace("%p\n", iface);
return 1;
}
......
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