On 19-Apr-2000 Scott Maxwell wrote:

> My app works on a PalmPilot Professional but not on the Personal so I want
> to popup an alert. I have thought about checking for the presence of the
> Expense app but this seems a bit hokey and would be really bad if the
> Expense app ever went away.

This is from Palm's Address application.  I use it to detect at least a
PalmPilot Pro because I need TCP/IP:


    Word err;
    DWord romVersion;
    ULong theInstalledRAM; 

    if (cmd == sysAppLaunchCmdNormalLaunch) {
        /*
         * This ROM version test comes from Palm's Address application.
         * Thankfully too because I would hate to guess at this kind of
         * stuff and make some poor guy's Pilot blow up.
         */
        FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
        /*
         * Need at least a PalmPilot Pro because of the TCP/IP.
         */
        if (romVersion < 0x03000000) {
            if ((launchFlags &
                (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp)) ==
                (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp)) {
                /*
                 * Pilot 1.0 will continuously relaunch this app unless we
                 * switch to another safe one.
                 */
                if (romVersion < 0x02000000) {
                    FrmAlert(RomIncompatibleAlert);
                    AppLaunchWithCommand(sysFileCDefaultApp,
                        sysAppLaunchCmdNormalLaunch, NULL);
                }
                err = MemCardInfo( 0, NULL, NULL, NULL, NULL, NULL,
                    &theInstalledRAM, NULL); 
                if (!err && (theInstalledRAM == 524288)) { 
                    /*
                     * We are running on a PalmPilot Personal unit
                     */
                    FrmAlert(RomIncompatibleAlert);
                    return sysErrRomIncompatible;
                }
               }
        }
        /*
         * I guess we are an appropriate ROM version so let's run.
         */


/* Chris Faherty <[EMAIL PROTECTED]>                 */
/* Your Stock has crashed - you must now restart your system */


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to