IsSourceRegistered Example (Visual J++)

   

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

// 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.

private static boolean SampleIsSourceRegistered()
   {
      boolean registered[] = { false, false };
      
      m_ESA.IsSourceRegistered( SAMPLE_SOURCE_GUID, registered );
      return( registered[ 0 ] );
   }