






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The component object model (com) is a language and operating system independent architecture for creating, deploying, and upgrading software components. It uses interfaces to define interactions between components, allowing for versioning and avoiding name clashes. Com supports multiple interfaces per component and uses reference counting for managing object lifetimes. The basics of com, interfaces, and related concepts such as hresult, queryinterface, and smart pointers.
Typology: Study notes
1 / 10
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