UltraLite User's Guide
C++ API Reference
ULData class
UL_PALM_LAUNCH_RET PalmLaunch( );
UL_PALM_LAUNCH_RET PalmLaunch( ul_synch_info * synch_info );
UL_PALM_LAUNCH_RET PalmLaunch( SQLCA* ca );
UL_PALM_LAUNCH_RET PalmLaunch( SQLCA* ca ,
ul_synch_info * synch_info );
typedef enum {
LAUNCH_SUCCESS_FIRST,
LAUNCH_SUCCESS,
LAUNCH_FAIL
} UL_PALM_LAUNCH_RET;
This function restores the application state when the application is activated. For applications using HotSync or Scout Sync synchronization, it carries out the additional task of processing the download stream prepared by the MobiLink HotSync conduit or MobiLink Scout conduit.
If you are using TCP/IP or HTTP synchronization, supply a null value for the stream parameter in the ul_synch_info synchronization structure. This information is supplied instead in the synchronization structure called by the ULConnection.Synchronize method.
ca A pointer to the SQLCA. You do not need to supply this argument unless you are using embedded SQL as well as the C++ API in your application and have used a non-default SQLCA.
synch_info A synchronization structure. For information on the members of this structure, see Synchronization parameters.
If you are using TCP/IP or HTTP synchronization, supply a null value for the stream parameter.
A member of the UL_PALM_LAUNCH_RET enumeration. The return values have the following meanings:
LAUNCH_SUCCESS_FIRST This value is returned the first time the application is successfully launched and at any subsequent time the internal state of the UltraLite database needs to be re-established. In general, the state of the database needs to be re-established only after severe failures.
You should open a ULData object when LAUNCH_SUCCESS_FIRST is returned.
LAUNCH_SUCCESS This value is returned when an application is successfully launched, after the Palm user has been using other applications.
LAUNCH_FAIL This value is returned when the launch fails.
A typical C++ API example is
ULData db; ULEnablePalmRecordDB( & sqlca ); switch( db.PalmLaunch( &synch_info ) ){ case LAUNCH_SUCCESS_FIRST: if( !db.Open() ){ // initialization failed: add error handling here break; } // fall through case LAUNCH_SUCCESS: db.Reopen(); // do work here break; case LAUNCH_FAIL: // error break; }