Profiling an ActiveX control using TrueCoverage



Why is TrueCoverage unable to instrument a project group that contains ActiveX control projects?


In some circumstances,  you might experience problems instrumenting because of the way Visual Basic registers ActiveX controls. These problems occur when the Version Compatibility option for ActiveX control projects is set to Project Compatibility. TrueCoverage works best when you set this option to Binary Compatibility for ActiveX control projects. By setting this option, you will avoid creating new GUIDs and re-registering the component each time you compile your project.

If you cannot set the Version Compatibility option to Binary Compatibility, use the following steps to minimize problems instrumenting with TrueCoverage:

1). Make sure you can build the project group in Visual Basic.

2). Exit Visual Basic and, when prompted, save all project files. This is necessary because Visual Basic improperly maintains a loaded reference to each ActiveX control.

3). Re-open your project group in Visual Basic and instrument with TrueCoverage.

NOTE: If you need to make changes to any of the ActiveX controls in the project group, repeat steps 1-3.

Do not compile the individual ActiveX control projects. This will change the GUID, so that references to the control will be incorrect. For more information on the Version Compatibility option, search for "When Should I Use Version Compatibility?" in the Microsoft Visual Basic 5.0 or 6.0 online Component Tools Guide.

Old KB# 11476
Comment List
Related Discussions