As of Location Manager v1.50 the easiest way to query location information is to launch it with specialized launch codes. It's easy to find Location Manager's database as follows: Getting the current position ---------------------------- Launch code: LAUNCH_GETPOS (32768) Parameter type: locationtype * Example: /* Necessary variables */ LocalID appid; DmSearchStateType sst; UInt card; DWord rv; Err err; locationtype loc; DmGetNextDatabaseByTypeCreator(true, &sst, 'appl', 'lmgr', true, &card, &appid); err = SysAppLaunch (card, appid, 0, LAUNCH_GETPOS, (Ptr) loc, &rv); /* At this point the variable loc has location information */ Getting the current GMT Offset ------------------------------ Launch code: LAUNCH_GETGMT (32769) Parameter type: locationtype * (defined in llmgr.h) This one is a little challenging because you need to pass Location Manager a timezone (you can get this from the location you obtained above). We use strings because they're easier to pass than floats. Example: /* Necessary variables */ LocalID appid; DmSearchStateType sst; UInt card; DWord rv; Err err; locationtype loc; CharPtr data; float gmtoffset; /* Get location here and store it in loc */ data = MemPtrNew (10); StrIToA (data, loc.tz); DmGetNextDatabaseByTypeCreator(true, &sst, 'appl', 'lmgr', true, &card, &appid); err = SysAppLaunch (0, dbID, 0, LAUNCH_GETGMT, data, &rv); gmtoffset = StrAToI(data); gmtoffset /= 10.0; /* At this point the variable gmtoffset has the gmt offset */ Finding out if the user wants to observe DST -------------------------------------------- Launch code: LAUNGH_GETODST (32770) Parameter type: NONE This is used to be nice...sometimes autoDST is not accurate for timezones, so the user can specify if they wish to observe DST rules or not. In general the answer is yes (1), but sometimes it's not, so you should check this. Example: /* Necessary variables */ LocalID appid; DmSearchStateType sst; UInt card; DWord rv; Err err; locationtype loc; UInt odst; /* Get location here and store it in loc */ DmGetNextDatabaseByTypeCreator(true, &sst, 'appl', 'lmgr', true, &card, &appid); err = SysAppLaunch (0, dbID, 0, LAUNCH_GETODST, 0, &rv); if (rv) { odst = 1; } else { odst = 0; } /* At this point odst is 1 if DST is observed, 0 otherwise */ Checking Auto DST rules for a given time and date ------------------------------------------------- Launch code: LAUNCH_ISDST (32771) Parameter type: dstdatetype * (defined in llmgr.h) This is to use the auto DST rules in Location Manager. dstdatetype is pretty straight forward. Fill it using the current date/time (or whatever date/time you care about), then do the following: Example: /* Necessary variables */ LocalID appid; DmSearchStateType sst; UInt card; DWord rv; Err err; locationtype loc; dstdatetype tzdate; UInt isdst; /* Get location here and store it in loc */ tzdate.tz = loc.tz /* Setup tz's year, month, etc etc */ DmGetNextDatabaseByTypeCreator(true, &sst, 'appl', 'lmgr', true, &card, &appid); err = SysAppLaunch (0, dbID, 0, LAUNCH_ISDST, (Ptr) tzdate, &rv); if (rv) { isdst = 1; } else { isdst = 0; } /* At this point isdst is 1 if it's currently DST or 0 otherwise */ Checking the version of Location Manager ---------------------------------------- Launch code: LAUNCH_VER (32800) Parameter type: NONE This is useful because versions previous to 1.50 of Location Manager did *NOT* support launch codes. Therefore you should check this first and ask people to upgrade if using previous to v1.50 (do it nicely). As a side effect, any version of Location Manager previous to v1.50 will return 0, but that's just fine. Please note that this function returns 100*version (ie: 150 for v1.50) Example: /* Necessary variables */ LocalID appid; DmSearchStateType sst; UInt card; DWord rv; Err err; DmGetNextDatabaseByTypeCreator(true, &sst, 'appl', 'lmgr', true, &card, &appid); err = SysAppLaunch (0, dbID, 0, LAUNCH_VER, 0, &rv); /* At this point rv is the version of Location Manager */