Information and Guidelines for Visual Basic Programmers

See Also   

To access the Visual Studio Analyzer programming interfaces from within Visual Basic, you need to add two type library references to your Visual Basic project. Once you add the type library references, you can access the methods within the programming interfaces using the Object Browser.

To add the Visual Studio Analyzer type library references

  1. Click the Project menu, and then click References.

  2. In the Available references box, select the check box for the following two type libraries:
  3. Click OK.

These libraries give you access to the event source installer and in-process event creator classes. You can use the Object Browser to access the methods for each class.

Constants for Visual Studio Analyzer Predefined Events

Visual Studio Analyzer ships with a number of predefined events. These events are identified by global unique identifiers (GUIDs) and must be referred to by their GUID each time you use them in code. However, you can make using these predefined events a little easier for yourself by creating constants for these events and saving them in a global file. You can then include that file in your projects that contain code for customizing Visual Studio Analyzer.

The predefined events and their GUIDs are listed in file vaids.h. This file contains C++ declarations. You can use this file as a source to create your file of Visual Basic constants.

For example, the DEBUG_EVENT_CALL predefined event appears in vaids.h as follows:

DECLARE_GUID(DEBUG_EVENT_CALL, 6c736d61, bcbf, 11d0, 8a, 23, 00, aa, 00, b5, 8e, 10);

In your file, use the following format:

Public Const DEBUG_EVENT_CALL = "{6c736d6-bcbf-11d0-8a23-00aa00b58e10}"