ATL and doing things the wrong way 
Author Message
 ATL and doing things the wrong way

Hi all:

Thanks to everyone for the help provided on the whole gettting the hwnd of
the container issue.  Also,
I have found that the following will work for an ATL windowless control:

HWND hParentWin
m_spInPlaceSite->GetWindow(&hParentWin);

Anyway, here's my latest dilemma.  My ActiveX control creates a DirectShow
filter graph. Don't worry, the fact that its DirectShow is not relevant to
the question.  A DirectShow filter graph is a COM object, and the filters
(which comprise the graph) are COM objects too.  The pins that connect the
filters are also COM objects.  The BSTRs that name the filters are also COM
objects, etc, etc, ad nauseaum.

Now, a lot of these bad boys are private data members of my ctrl.  After I
am done with the ctrl, where should I release them?  The destructor does not
seem to be the appropriate place...I tried that and the debug.dll  is
telling me that there are still active objects.  FinalRelease() is also not
doing the trick.  Can anyone point me in the right direction?  Some
explanation of the life cycle of an ActiveX control wouldn't hurt.



Mon, 07 Apr 2003 03:00:00 GMT  
 ATL and doing things the wrong way

Oh, BTW, the reason I say I am doing things the wrong way is because I am
not using smart pointer like I should.


Quote:
> Hi all:

> Thanks to everyone for the help provided on the whole gettting the hwnd of
> the container issue.  Also,
> I have found that the following will work for an ATL windowless control:

> HWND hParentWin
> m_spInPlaceSite->GetWindow(&hParentWin);

> Anyway, here's my latest dilemma.  My ActiveX control creates a DirectShow
> filter graph. Don't worry, the fact that its DirectShow is not relevant to
> the question.  A DirectShow filter graph is a COM object, and the filters
> (which comprise the graph) are COM objects too.  The pins that connect the
> filters are also COM objects.  The BSTRs that name the filters are also
COM
> objects, etc, etc, ad nauseaum.

> Now, a lot of these bad boys are private data members of my ctrl.  After I
> am done with the ctrl, where should I release them?  The destructor does
not
> seem to be the appropriate place...I tried that and the debug.dll  is
> telling me that there are still active objects.  FinalRelease() is also
not
> doing the trick.  Can anyone point me in the right direction?  Some
> explanation of the life cycle of an ActiveX control wouldn't hurt.



Mon, 07 Apr 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Difference between two different ways of doing things

2. Simpler way of doing things in VC7 ATL?

3. For those who like doing things backwards

4. Doing things with the printer !!!

5. doing graphical thing on the dos prompt

6. _open not doing the right thing

7. debugging things done vis nmake

8. Trouble doing simple things

9. ASSERT doing strange things

10. Newbie doing dumb things with m_strFilter...please help

11. -How do i return an error when any thing gone wrong inside thread procedure-

12. Threading problem. I'm doing something wrong

 

 
Powered by phpBB® Forum Software