Re: How to get Interface reference counting in ATL
- From: Jaime Stuardo <JaimeStuardo@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Jun 2006 11:57:02 -0700
Sorry, but I didn't explain myself. That is not a real production
environment, but a QA one.
The fact is that when a program is debugged step by step, normally an ideal
situation occurs. I need to test the application at the real speed and to see
when an object is created and when it is destroyed (if it really is). The
component is actually called from an ASP page. In that page a lot of
CreateObject calls occured, so I need to track them all.
Another reason of why I cannot do it step by step is because of the
following scenario :
- I have a windows service application that monitors connections made by the
component. That monitoring is possible because the component calls an Oracle
component that keep track of connections, so I don't need to care about
sharing memory and those matters.
- The component is also instantiated by a client application programmed in a
language such as VB or ASP.
- The component isn't registered as COM+ using Component Services. It is
registered when I run the executable with the -Service parameter.
I could instantiate the component by mean of a Visual C++ client application
but I have the following problems :
- I'm using VS.NET 2005 and ATL 7.0. I could instantiate it, but I don't
know why when a component method is executed, execution doesn't continue in
the component code.
- The main problem is that it is very different to call a component from a
Visual C++ application than from a VB or ASP application, specially regarding
parameter types.
When I have programmed COM+ components using ATL 6 before, I could debug
using VB or ASP because I knew the ID of the COM+ application and I had only
to set the debugging application to DLLHOST.EXE. In this case, I cannot do so.
Finally, when I used _ATL_DEBUG_INTERFACES it didn't work for all cases.
When I called QueryInterface using a non-smart pointer, and then released it,
nothing was shown in output window, but it was when I used CreateInstance. I
need something to inform about all interface referencing, and not for some of
them.
Jaime
"Brian Muth" wrote:
.
"Jaime Stuardo" <JaimeStuardo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:801E1074-8EC2-4EAA-BCA7-76F0CE65496E@xxxxxxxxxxxxxxxx
I tried that but I got 2 problems:
1.- I need to save the result in event log, since I need to test the
application in production environment, not step by step.
Debugging in an production environment is a very bad idea, IHMO. That said,
you can use WinDBG. It will pick up the logged output generated by
_ATL_DEBUG_INTERFACES.
2.- I have used that macro but it seems it works only for smart pointers.
Not true.
Brian
- Follow-Ups:
- Re: How to get Interface reference counting in ATL
- From: Brian Muth
- Re: How to get Interface reference counting in ATL
- References:
- Re: How to get Interface reference counting in ATL
- From: Jason Newell
- Re: How to get Interface reference counting in ATL
- From: Brian Muth
- Re: How to get Interface reference counting in ATL
- Prev by Date: Re: Two ATL COM objects running simultaneously
- Next by Date: Re: How to get Interface reference counting in ATL
- Previous by thread: Re: How to get Interface reference counting in ATL
- Next by thread: Re: How to get Interface reference counting in ATL
- Index(es):
Relevant Pages
|