The following sections describes how you can trace the usage of Windows resources in .NET applications:
About Tracing Windows Resources
The Resource profiler does not trace resource allocations and deallocations done with .NET objects. The profiler traces only the use of Windows resources.
There are two possible ways of working with Win32 API functions from a .NET application:
You can use the Resource profiler to see how your managed (.NET-connected) application uses Windows resources. This will help you decide whether you need to optimize your application or not. For instance, if your application allocates too many GDI handles at some point of time, you may consider using other components or reducing the number of controls on forms.
Preparing AQTime Project
In .NET, the code that operates Windows resources resides in the mscorwks.dll assembly (that is, this assembly contains functions that allocate and release resources). You need to add this assembly to your AQTime project to make the profiler able to track the use of Windows resources in your application.
The assembly is part of Microsoft .NET Framework. You can find it in the <Windows>\Microsoft.NET\Framework\<framework_version> folder. If several versions of the .NET Framework are installed on your computer, add the assembly that is used by the Framework version that is appropriate for your application. For detailed instructions on adding modules to AQTime projects, see Selecting Applications and Modules to Profile.
Profiling .NET Applications
After you add the assembly, you can start the profiling. To get information on Windows resources that are used at certain point of the run, use the Get Results command. The profiler will generate results and display them in AQTime’s Report panel. Note that as mscorwks.dll does not have debug information, AQTime cannot trace the call stacks for allocated resources.