OLE Design Architecture
  Home FAQ Contact Sign in
Your Ad Here
comp.os.mswindows.programmer.win32 only
 
Advanced search
POPULAR GROUPS

more...

comp.os ... win32 Profile…

 Up
OLE Design Architecture         


Author: Raja
Date: May 11, 2008 05:19

Hi All,
I am a newbie to OLE technology and started up with
http://www.relisoft.com/win32/olerant.html in which the author
presents the statement "Anybody who knows C++ can do it with their
eyes closed. So why can't you do the same in OLE? Here comes the Flaw.
You have to be able to obtain the IBar interface from the IFoo
interface using its QueryInterface. But, wait a minute, the object
FooObj that provides the implementation of all methods of IFoo,
including QueryInterface, had no clue about IBar! It could have been
created long before anyone even thought about the possibility of IBar.
So how can it provide access to IBar?

Good question. I'm not going to go into the gory details of the
aggregation hack that is supposed to solve this problem. Given the
constraints of the flawed initial design, it is a truly ingenious
hack. So is there a better design? Read on..."

Can anyone please explain what the hack is ? Any pointers to better
understanding of design as well, is appreciated.

Thanks,
Raja.
1 Comment
Re: OLE Design Architecture         


Author: boris
Date: May 12, 2008 02:30

"Raja" gmail.com> wrote in message
news:41d3180b-f916-40fa-ab69-b2bd02bb3cca@b64g2000hsa.googlegroups.com...
> Hi All,
> I am a newbie to OLE technology and started up with
> http://www.relisoft.com/win32/olerant.html in which the author
> presents the statement "Anybody who knows C++ can do it with their
> eyes closed. So why can't you do the same in OLE? Here comes the Flaw.
> You have to be able to obtain the IBar interface from the IFoo
> interface using its QueryInterface. But, wait a minute, the object
> FooObj that provides the implementation of all methods of IFoo,
> including QueryInterface, had no clue about IBar! It could have been
> created long before anyone even thought about the possibility of IBar.
> So how can it provide access to IBar?
>
> Good question. I'm not going to go into the gory details of the
> aggregation hack that is supposed to solve this problem. Given the
> constraints of the flawed initial design, it is a truly ingenious
> hack. So is there a better design? Read on..."
>
> Can anyone please explain what the hack is ? Any pointers to better ...
Show full article (1.69Kb)
no comments