At 3:35 PM +0100 1/6/04, Aaron Ardiri wrote:
> Aaron -- your paper also has the routine

Boolean onPOSE() {
> return HostGetHostID() == hostIDPalmOSEmulator;
}

Is this one less guaranteed?

you need POSE 3.0 or greater to use this; and, POSE 3.0 came out *years* ago :) its even up around 3.5 i think from memory :P checking the feature is easier :)

The main restriction on calling HostGetHostID() is that it will work only on Palm OS 3.0 or later when running on an actual device. Calling HostGetHostID() will work on Poser 2.0d5 (which was released on 1998-04-17) or later, regardless of the version of Palm OS running within it.


FWIW, here's my own version of OnPoser() -- I hope I got it right...

static Boolean OnPoser(void)
{
    UInt32 value;

    // On Palm OS 3.0 or later, HostGetHostID is guaranteed to be
    // implemented.

    if (sysGetROMVerMajor(PalmOSVersion()) >= 0x03)
    {
        return HostGetHostID() == hostIDPalmOSEmulator;
    }

    // On earlier systems, check for a System Feature that Poser
    // automatically installs during bootup.

    return FtrGet(kPalmOSEmulatorFeatureCreator,
        kPalmOSEmulatorFeatureNumber, &value) == errNone;
}

-- Keith

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to