IsDynamicSourceRegistered Example (Visual C++)

   Applies To

This example shows what a call to IsDynamicSourceRegistered 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 dynamic component is already registered.

// SAMPLE_DYNAMIC_SOURCE_GUID is the GUID for the dynamic component
// (defined in preceding code); substitute the GUID for your dynamic 
// component.

boolean SampleIsDynamicSourceRegistered()

{
   HRESULT hr = pESI->IsDynamicSourceRegistered( SAMPLE_DYNAMIC_SOURCE_GUID );
   return( S_OK == hr );
}