About Loadstub
[This is preliminary documentation and subject to change.]
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 it 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 the option exists. The /C also repairs the database before compaction.
-
It executes the /E option, if it exists, to empty a specified tuning space.
-
It executes the /LEH option to load the specified enhancements file, if the option exists.
Once Loadstub has parsed all options, it:
-
Uses the globally unique identifier (GUID) from the command line to extract the name of the loader DLL from the 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 window 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 broadcast window 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 entries in the Program Guide Loaders key of the system registry.