BeginSession Example (Visual C++)

See Also   Applies To

This example shows what a call to BeginSession looks like. Refer to ISystemDebugEventFire Example (Visual C++) 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.
void SampleBeginSession()
{
   pIEC->BeginSession( SAMPLE_SOURCE_GUID, L"Sample Session Name");
}