Re: ATL-COM: return pointer to instance
From: Joe (joerider_at_uboot.com)
Date: 02/16/05
- Next message: Joe: "Re: Regarding TCP socket .........."
- Previous message: thatsalok: "Re: Learning the win32 API"
- In reply to: thatsalok: "Re: ATL-COM: return pointer to instance"
- Next in thread: Simon Trew: "Re: ATL-COM: return pointer to instance"
- Reply: Simon Trew: "Re: ATL-COM: return pointer to instance"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 16 Feb 2005 11:23:13 +0100
thatsalok schrieb:
> STDMETHODIMP Ctest::getTest(Itest* *t)
> {
> Ctest *parent = ...;
> *t = parent;
> return S_OK;
> }
It seems, it was too simple to see!
Who destroys the upper *parent-Instance?
In my program a tree is built with items
tree
|-item (root)
|-item
|-item
...
|-item
|-item
|-item
This structure is already existing. For reusability I'd like to create
an ATL-COM around this tree. Let's call it CTree with the Interface
ITree. The items should be provided with CItem and IItem. Now, as you
might know, I don't want to rebuild the existing tree. Therefor, I need
to create instances of CItem within CTree to make them accessable. But
where do i delete those instances?
I think, I should use pointers in CItem that points at an item-instance.
Thanks for hints,
Joe
- Next message: Joe: "Re: Regarding TCP socket .........."
- Previous message: thatsalok: "Re: Learning the win32 API"
- In reply to: thatsalok: "Re: ATL-COM: return pointer to instance"
- Next in thread: Simon Trew: "Re: ATL-COM: return pointer to instance"
- Reply: Simon Trew: "Re: ATL-COM: return pointer to instance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|