Implementing the Entry-Point Function

[This is preliminary documentation and subject to change.]

A database loader DLL must implement a standard entry-point function for Loadstub to call. The call to that entry-point function starts the DLL code that loads data into the Guide database. The entry-point function must be named EPG_DBLoad.

The prototype for this function is

ExitCodeList APIENTRY
EPG_DBLoad(int &argc, _TCHAR **argv, CdbDBEngine &db
    , PFNFORCEQUIT pfnForceQuit);
 

where the first two parameters are the command line parameters as you would see in a main function of a standard C program. The next parameter is a reference to the database, and the final parameter is the address of the quit-processing callback function. This callback function returns TRUE if the operating system is trying to shut down the loader, and FALSE otherwise.

Note  The sample loader, Load.cpp, already contains an implementation of EPG_DBLoad. Thus, if you build your loader using the Load framework, you do not need to implement this function. For more information on Load, see Broadcast Architecture Sample Applications. For more information on writing a loader, see Writing a Custom Guide Database Loader.