You are here: Office-Outlook.com  / Outlook Forum

Profiling Add-ins?

Home » Outlook addins and plugins development » Developer Outlook add-ins
Profiling Add-ins? [message #871] Wed, 16 August 2006 12:03 Go to next message
Dave[1]
Messages: 4
Registered: August 2006
Junior Member
Most of the profilers I've seen, JetBrains' dotTrace, Ants and NProf,
all look for a .NET exe entry point to start the profiling session. How
does one go about profiling .NET dlls that have been pulled in by
unmanaged processes, for instance Office Add-ins??
Re: Profiling Add-ins? [message #883] Thu, 17 August 2006 14:10 Go to previous messageGo to next message
Dave[1]
Messages: 4
Registered: August 2006
Junior Member
>From what I can tell all of the profilers make use of MS's .NET
profiling API, which requires an exe entry point. There's another
profiler from Sci Tech that can latch onto existing processes, but if
the parent process is unmanaged that doesn't help me.

I have a frustrating bug that comes and goes where PowerPoint persists
as a service even after I've closed the main window. This is apparently
because some resources have not been released (or so I gather from
reading similar accounts regarding Outlook AddIns) causing PowerPoint
to hang and never call OnDisconnection on my shim.

A profiler would sure come in handy at this point...

XL-Dennis wrote:
> Hi Dave,
>
> I've been playing around with a 'shimmed' COM add-in. I can't access the
> unmanaged COM add-in (which share the same memory area as Excel.exe) or the
> underlying managed COM add-in. The later should be in it's own AppDomain but
> I lack the knowledge how to access the AppDomain.
>
> --
> With kind regards,
> Dennis
>
>
> "Dave" wrote:
>
> > Most of the profilers I've seen, JetBrains' dotTrace, Ants and NProf,
> > all look for a .NET exe entry point to start the profiling session. How
> > does one go about profiling .NET dlls that have been pulled in by
> > unmanaged processes, for instance Office Add-ins??
> >
> >
Re: Profiling Add-ins? [message #942] Thu, 24 August 2006 16:49 Go to previous message
Dave[1]
Messages: 4
Registered: August 2006
Junior Member
The problem did eventually go away, although I was never able to track
down the offending assembly and/or COM object that was causing
PowerPoint not to release.

And I did set up output statements to a log file that showed
OnDisconnection was never being called. All of my resources would have
been cleaned up/nulled out in that method.

Dave

XL-Dennis wrote:
> Dave,
>
> I had the impression that the unmanaged standard COM DLL release all
> reference to its host(s) when shutting down...
>
> It's not recommended to use ReleaseComObject or FinalReleaseComObject in the
> OnDisconnection event:
> http://blogs.msdn.com/eric_carter/archive/2004/04/07/108898. aspx
>
> Some basic stuff You can do:
> Msgbox in OnDisconnection event to see that it kicks in.
> Set all variables to Nothing in the same event.
> Make sure that the latest SP for Office is installed.
>
> I really wish that MSFT would provide us with a tool to document and track
> down errors with managed COM add-ins like the one for VSTO:
> http://www.microsoft.com/downloads/details.aspx?FamilyId=C9F B6A54-8069-4918-A6F9-E744928DFAC3&displaylang=en
>
> --
> With kind regards,
> Dennis
Previous Topic:How to clear undo list in PowerPoint?
Next Topic:Security issue from within Word?
Goto Forum: