Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 186823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:42:52+00:00 2026-05-11T15:42:52+00:00

I have noticed that numerous books, etc. on COM point out that it is

  • 0

I have noticed that numerous books, etc. on COM point out that it is relatively easy to implement an object that can be used as an inner object in COM aggregation. However, unless I am missing something, it seems that aggregation can only be successful in extremely limited scenarios and thus support for it should only be provided when such a scenario is specifically recognized.

The part that troubles me is as follows. COM aggregation combines an inner object’s identity with that of an outer object. The implementor of the outer object selects a subset of the inner object’s interfaces and forwards requests for those interfaces to the inner object. The inner object forwards all requests for interfaces to the outer object. Now suppose that the inner object, as part of its implementation, constructs child COM objects. Presumably an interface pointer is passed to that COM object so it can communicate with its parent. The inner object has some idea of the interfaces that it implements. However the outer object might have chosen not to forward some of those interfaces. Indeed, documentation states that an outer object should not blindly forward interfaces. This seems to imply that the inner object often cannot hand away interface pointers to other COM objects unless the outer object is specifically required to forward all of those interfaces to the inner object. This is not limited to a child object scenario. Indeed, any place where the inner object implementation passes an interface pointer seem like they could be affected.

So, it appears that aggregation is not general purpose because–in cases where the inner object must communicate with other COM objects–it places strict requirements on the outer object as to which interfaces minimally must be forwarded and more interfaces cannot be added to this list in future versions of the inner object without breaking compatibility with existing outer objects that do not forward those interfaces.

Is this a correct (and seldom documented) description of the way things actually are or is there more to the story?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:42:53+00:00Added an answer on May 11, 2026 at 3:42 pm

    Found your thread languishing here, thought I’d respond. For starters, aggregation compares to encapsulation in OOP, but with some significant differences. What is nice is that little work is needed in the outer interface to expose an aggregated interface. What is not nice is that an interface needs to be designed to be aggregatable from the get-go, a requirement that OOP encapsulation doesn’t have. That limits the odds where you have a COM class laying on the shelf, ready to be borged. From my own work, when facing the question whether or not to support aggregation, I’ve yet to answer ‘yes, might be useful some day’. The headaches from implementing the delegating and non-delegating IUnknowns have led me to ‘no’.

    Your question about inner interfaces creating objects is easy to answer. An inner interface is not supposed to know that it got aggregated. More to the point, it cannot know who aggregated it. It can thus not know whether or not the outer is at all useful to the object or if it will properly delegate QI. Not a real problem, it can simply hand it an interface pointer to one of its own interfaces. Being aggregated does not forbid it. Only unknown interfaces need to be forwarded.

    But yes, aggregation isn’t very practical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

I noticed that a site I'm maintaining had a little layout bug in FF/IE8/Chrome
So, im trying to write some code that utilizes Nvidia's CUDA architecture. I noticed
I recently turned on Windows Firewall logging on my computer and started tracking incoming
At work, I'm frequently working on projects where numerous properties of certain objects have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.