Re: Passing Smart Pointers as Parameters
- From: Stefan Weber <stefan.weber@xxxxxxxxx>
- Date: 24 Apr 2007 22:33:56 -0700
To do this, I stumbled
over the _ATL_DEBUG_INTERFACES macro. Unfortunately, this does not
seem to work in my setup here: I inserted it in stdafx.h before
including atlbase.h, but in my own COM objects, I don't get the debug
output when calling QI/AddRef/Release (respectively when the smart
pointers call these functions).
How do you obtain interface pointers on your own object? If you want
debugging wrappers, you must go through QueryInterface, and not, say,
directly casting 'this' pointer.
It's not the problem with the interfaces on my object. The problem
occurs with the interfaces of other objects. For example the
IHTMLElement of a object in the browser's DOM. I tried it manually
with QI as well as with CComQIPtr--both variants don't provide any
debug output...
So obviously, I'm always going through the QI for these and thus
should see the debug output, right? Any idea of a potential problem?
Thanks,
Stefan
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: Passing Smart Pointers as Parameters
- From: Igor Tandetnik
- Re: Passing Smart Pointers as Parameters
- References:
- Passing Smart Pointers as Parameters
- From: Stefan Weber
- Re: Passing Smart Pointers as Parameters
- From: Kim Gräsman
- Re: Passing Smart Pointers as Parameters
- From: Stefan Weber
- Re: Passing Smart Pointers as Parameters
- From: Igor Tandetnik
- Passing Smart Pointers as Parameters
- Prev by Date: C++ IHTMLTxtRange regular expression question
- Next by Date: odl and idl?
- Previous by thread: Re: Passing Smart Pointers as Parameters
- Next by thread: Re: Passing Smart Pointers as Parameters
- Index(es):
Relevant Pages
|