This example shows what a call to IsDynamicSourceRegistered 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 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.
private static boolean SampleIsDynamicSourceRegistered()
{
boolean registered[] = { false, false };
m_ESA.IsDynamicSourceRegistered( SAMPLE_DYNAMIC_SOURCE_GUID, registered );
return( registered[ 0 ] );
}