RegisterSource Example (Visual C++)

   Applies To

This example shows what a call to RegisterSource looks like. Refer to ISystemDebugEventInstall 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.

// Register the component we checked for above.
// SAMPLE_SOURCE_GUID is defined above; substitute the GUID for your
// component. Assign a name for the component (Sample Event Source) using
// Unicode characters.

void SampleRegisterSource()

{
   pESI->RegisterSource( L"Sample Event Source", SAMPLE_SOURCE_GUID );
}