About Loadstub
Guide database loaders are all called as needed by a standard loader stub program. This stub program, Loadstub.exe, is scheduled to run at appropriate times to update the Guide database.
When the stub program starts, it first parses the command line for recognized options. The options Loadstub recognizes are /X, /R, /C, /E and /LEH; for more information on these options, see Using Loadstub. Loadstub passes any other options on to the loader. Loadstub parses options in this order:
- It executes the /X option to replace the database, if this option exists.
- It starts the Microsoft® Jet database engine.
- It executes the /R option to repair the database, if this option exists, and does a quick check and repair of corruption errors if it does not.
- It executes the /C option to compact the database, if this option exists. The /C also repairs the database before compaction.
- It executes the /E option to empty the specified tuning space, if this option exists.
- It executes the /LEH option to load the specified enhancements file, if this option exists.
Once Loadstub has parsed all options, it:
- Uses the globally unique identifier (GUID) specified on the command line to extract the name of the loader DLL from the operating-system registry.
- Extracts user and password information from the loader.
- Opens a workspace in the DAO database named
LoaderWSP
and a user named loader
.
- Creates a Microsoft® Windows® operating system message by calling the RegisterWindowMessage function, part of the Microsoft® Win32® application programming interface (API). On the RegisterWindowMessage call, Loadstub passes the string representation of the loader's GUID.
- Broadcasts an EPGLDR_STARTING message to notify broadcast client applications that the database is receiving updated data. For more information on broadcasting Windows messages, see Sending Loader Event Notifications.
- Starts the loader DLL.
- Broadcasts an EPGLDR_ENDING message to notify client applications that the database update is completed and to indicate success or failure.
- Updates the LastAttempt and LastRun values in the Program Guide Loaders key of the registry.