Remote Reference Counting

How many times does an application call the IUnknown::AddRef() and IUnknown::Release() methods? How many ants live in North America? Because COM+ uses the IUnknown::AddRef() and IUnknown::Release() methods to perform reference counting, it would be a drain on performance if you waited one network cycle every time somebody called the reference counting functions. To remove this potential flaw, DCOM implements the IRemUnknown interface. Listing 9.3 shows the IDL (interface definition language) for the IRemUnknown interface.

Code Listing 9.3. Interface Definition of IRemUnknown
 interface IRemUnknown : IUnknown { HRESULT RemQueryInterface( [in] REFIPID ripid, [in] unsigned long cRefs, [in] unsigned short cIids, [in, size_is(cIids)] ...

Get COM+ Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.