If you want your component to generate Visual Studio Analyzer events, the first thing you must do is add code that will register the component with Visual Studio Analyzer. Add this code to your component's installation or startup code, depending on when you want to register your component. You can register your component with Visual Studio Analyzer at one of three times:
The following lists the steps you must take with code in your component in order to register that component with Visual Studio Analyzer:
The event source installer object is a COM object that provides methods for registering your component with the Visual Studio Analyzer Event Monitor. How you create this object depends on the language in which your component is written, as shown in the following table:
Language | Code to Create an Event Source Installer Instance |
Visual Basic |
|
Visual C++ |
|
Visual J++ |
|
The RegisterSource method registers your component as a normal component. Most components fall into this category. Use the RegisterDynamicSource method to register your component as a dynamic component, which generates events at defined intervals.
The interface exposed by the event source installer object is not a dual interface; therefore, the version of the interface you use depends on the language in which your component is written:
Language | Event Installer Interface |
Visual Basic, Visual J++ | IsystemDebugEventInstallAuto |
Visual C++ | ISystemDebugEventInstall |
If your component is not COM-enabled, use the Visual Studio Analyzer standard RPC interface, VsaRpcl.
See Registering New Event Categories with Visual Studio Analyzer for information on how to do this.
See Registering New Events with Visual Studio Analyzer for information on how to do this.