Processing Quit Events

[This is preliminary documentation and subject to change.]

While a loader is loading data into the Guide database loadstub cannot check for messages from the operating system. Thus, there is no way for the loader to receive a notification to quit processing.

Instead, Loadstub monitors the operating system message queue for quit event notifications. At convenient times in loader processing, your loader should call the function at the address in pfnForceQuit. Note that Loadstub.exe passes this address to the loader through a parameter for the DLL's entry-point function. This function enables Loadstub to forward quit event notifications to the loader so that the loader can stop processing, if necessary.

Your loader can implement this functionality by calling the following code whenever loader processing can be gracefully stopped

if ((*pfnForceQuit()){ 
  //Code to clean up and gracefully exit the loader
}
 

where pfnForceQuit was passed in the entry-point function.