What is the quickest way to test whether globals are available in OS 3-4? I need to know that from within a function that may be called by Global Find. I'd hate to have to propagate the launch code. I know I can test for the running app database and see if it's mine- is there something less tedious?
Hmmm... look in the CW runtime library for CWPalmOS.h and see the prototype for SysGetAppInfo. That's an undocumented OS call, and it returns a pointer to a SysAppInfoType. One of the fields of this type is the launch flags.
Now, this works fine on Palm OS 4. On OS 5, it mostly works -- the structure you get back will not have all of its fields set correctly, but it should have a valid launchFlags value. I've not yet tested this on OS 6, but I expect it acts like OS 5, since this is needed by the expanded mode runtime library in CW for Palm OS.
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
