RegisterStockEvent Example (Visual C++)

   Applies To

This example shows what a call to RegisterStockEvent 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 a system-defined event for the component to generate. 
// SAMPLE_SOURCE_GUID is the component that will generate the event
// being registered; DEBUG_EVENT_CALL is the event.

void SampleRegisterStockEvent()
{
   pESI->RegisterStockEvent( SAMPLE_SOURCE_GUID, DEBUG_EVENT_CALL );
}