BeginSession Example (Visual J++)

   

This example shows what a call to BeginSession looks like. Refer to ISystemDebugEventFire Example (Visual J++) to see the constant declarations and object creation code, as well as to see this code in a form you can run with minor modifications.

// Begin a session with the component.
// SAMPLE_SOURCE_GUID identifies the component.
// Specify a name (Sample Session Name) to uniquely identify the session
// to Visual Studio Analyzer. The session name must be unique for each
// time, each component, and each run of the component.
private static void SampleBeginSession()
   {
      m_IEA.BeginSession( SAMPLE_SOURCE_GUID, "Sample Session Name" );
   }