IsSourceRegistered Example (Visual C++)

   Applies To

This example shows what a call to IsSourceRegistered 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.

// Check to see whether a component is already registered.

// SAMPLE_SOURCE_GUID is the GUID for the component (defined in preceding 
// code); substitute the GUID for your component.
boolean SampleIsSourceRegistered()
{
   HRESULT hr = pESI->IsSourceRegistered( SAMPLE_SOURCE_GUID );
   return( S_OK == hr );
}