RegisterSource Example (Visual Basic)

   

This example shows how to register a component. Refer to ISystemDebugEventInstall Example (Visual Basic) to see this code in context.

' Register a normal component with Visual Studio Analyzer.
Private Sub Sample_RegisterEventSource()
   Dim sSourceGUID As String
   Dim sSourceName As String
   ' You need a unique GUID to assign to the component;
   ' substitute your own in the following line.
   sSourceGUID = "{B3303262-5C87-11d1-A2AD-00AA003B23FF}"
   ' Assign a name to the component.
   sSourceName = "MyEventSource1"
   ' Run the method.
   mESI.RegisterSource sSourceGUID, sSourceName
End Sub