Re: How to get Interface reference counting in ATL



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



.



Relevant Pages

  • Re: Application "deployment" tool?
    ... ties in with SVN would be fantastic. ... environment and how things are managed. ... a UAt/QA/testing environment and the production ... create a release tag when new code is bundled up for promotion to uat ...
    (comp.databases.oracle.server)
  • Re: Splitting an DFSMShsm environment
    ... restore on the test system to an empty newly created HSM environment to ... I like this one as it leaves your production ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: The curse of constant fields
    ... EAR construction etc) for a reasonably important J2EE ... No automated testing of the complete app through its web ... Also, presumably, before you deploy to production, you deploy to a staging ... or pre-production environment which replicates the production environment, ...
    (comp.lang.java.programmer)
  • Re: [SMS] DB2 Table/IndexSpace managed placement vs. StorClas MSR attributes
    ... type for your production environment, so the drives will all perform the ... same no matter what storage class attributes are assigned. ... I've been storage managing all DB2 regions except production for 2-3 ...
    (bit.listserv.ibm-main)
  • Re: Creating a test Domain/Forest (need Help Please)
    ... If your one server will be the only one in your dev environment, then you should seize all roles, not just FSMO. ... you then have an exact copy of your production AD. ... You can use exmerge to> copy the mailboxes in production, ... >> Then add an exchange server and migrate the mailboxes. ...
    (microsoft.public.windows.server.active_directory)