






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







IStream (^) Method 1 Method 2 Method 3 Method 4
IStream (^) Method 1 Method 2 Method 3 Method 4 IPrint (^) Method 1 Method 2 Method 3 Method 4
STDMETHODIMP QueryInterface(const IID& iid, void **ppv) { if (iid == IID_IUnknown || iid == IID_IFoo) ppv = static_cast<Foo>(this); else if (iid == IID_IBar) *ppv = static_cast<Bar *>(this); else { *ppv = null; return E_NOINTERFACE; } reinterpret_cast< IUnknown >(ppv)->AddRef(); return S_OK; }
Bar
Foo
IUnknown
IFoo
IUnknown
IBar
inner
Bar
Foo
IUnknown
IFoo^ outer
IUnknown
IBar
inner