Step by step: How to profile an activeX dll/ocx/exe

Note: If your dll is an IIS dll, please see Step by step: How to profile an IIS project instead.

The good news is that it is exactly the same procedure as profiling a standard exe.

Basically: let VB Watch instrument and compile your activeX, then exercize it with your usual container application.

Here is it again, with step 2. updated to check about the Retained in memory project option:

1. Run the profiler: menu Start / Programs / VB Watch 2 / VB Watch Profiler.
2. Click the Options... button in the toolbar and make sure the plan you want to use is selected (Full profiling is suggested).

In case your dll is Retained in memory (in the VB6 project's options): press the Open VB Watch Control Center... button, goto the General Options tab, and make sure that Disable Retained in memory... is checked.

3. Click the Profile Project... button on the left and browse for your project you wish to profile.
If you do not have a project ready, you can load the following test project: \Program Files\VB Watch 2\Samples\VB6\Profiler Sample\TestProfiler.vbp.

Here is all what happens:

4. Exercize your activeX with your usual container application so that it executes the parts you want to profile.

5. Close the container application. Back in the profiler, your session appears in the top left list view. You can now analyze it.

What do you want to know more about?

Topic link

VB Watch Profiler Reference

Topic link

VB Watch Profiler Guided Tour