ICity

Send Feedback

The ICity interface represents a city in the Cities folder. Most of the cities used by the World Clock are provided in ROM and cannot be deleted.

Note   This interface is supported only for Pocket PC 2000 software for Pocket PCs. All ICity methods return E_NOTIMPL for Pocket PC and Smartphone 2002 software and later. See Remarks for information on how to use the City List data for Pocket PC and Smartphone 2002 software and later.

Methods in Vtable Order

ICity methods PPC SP Description
get_Longitude X X Gets the longitude for the city.
get_Latitude X X Gets the latitude for the city.
get_TimezoneIndex X X Gets the time zone index for the city.
get_AirportCode X X Gets the airport code for the city.
get_CountryPhoneCode X X Gets the telephone country code for the city.
get_AreaCode X X Gets the area or city code for the city.
get_Name X X Gets the name of the city.
get_Country X X Gets the country for the city.
get_InROM X X Gets a Boolean value indicating whether the city is stored in ROM.
put_Longitude X X Sets the longitude for the city.
put_Latitude X X Sets the latitude for the city.
put_TimezoneIndex X X Sets the time zone index for the city.
put_AirportCode X X Sets the airport code for the city.
put_CountryPhoneCode X X Sets the telephone country code for the city.
put_AreaCode X X Sets the area or city code for the city.
put_Name X X Sets the name of the city.
put_Country X X Sets the country for the city.
Save X X Saves a city item.
Delete X X Deletes a city item.
Copy X X Copies a city item.
get_Application X X Gets the main Outlook Mobile IPOutlookApp object.

Remarks

To provide better filtering support, ICity::get_TimezoneIndex returns a one-based time zone index rather than a time zone object. To get a time zone object, call GetTimeZoneFromIndex on the Outlook Mobile application object.

You can add or remove cities stored in RAM. Additionally, in POOM version 1.1 and later, you can change the properties for any city whether it is stored in RAM or ROM. If you attempt to change or save a city while the World Clock is running, you get the error code E_CLOCKRUNNING because the World Clock program does not accept changes to the cities while it is running.

If you are running a version of Pocket Outlook earlier than 1.1 and you try to save changes to properties of a city stored in ROM, the error code E_CITYINROM is returned.

When you create a city, it must meet the conditions listed in the following table. Otherwise, the city will not be saved successfully. Any attempt to set an illegal value for a city fails.

Property Condition
Longitude Between -18000 and 18000.
Latitude Between -9000 and 9000.
Time zone index Correspond to a valid time zone.
String values Less than 256 characters in length.
Name Must be set.
Country Must be set.

The following information applies to City List Data:

  • Pocket PC and Smartphone 2002 software and later cannot programmatically access the City List data that is available through the ICity interface. To assist developers who need this data for their applications, two files are provided in the \Resource folder of the Windows Mobile SDK:
    • Citylist.csv ** contains City Name, Country/Region, Longitude and Latitude, Nearest Airport Code, Telephone Dialing Prefix, Telephone Area Code, and the Timezone Index for various cities.
    • Timezones.csv contains the Timezone Index, GMT Differential, and Description for each time zone.
  • To use the data, relate the Timezone Index from the Citylist.csv data to the Timezone Index of the Timezones.csv data.
  • You can use these files in your application on Windows Mobile–based devices. You can add or remove content to these files. You can redistribute these files as is or repackage this data by including it in source code, a database, or another format. Microsoft bears no responsibility for the content or usage of these files. Certain locales have specific legal requirements with regard to providing data of this type; ensure you are in compliance with such regulations. You cannot use these data files on any platform other than Windows Mobile platforms. You are permitted to use excerpts of this data rather than the entire data set.
  • If you use the city data provided or if you use any type of geographical information from any source, you are encouraged to provide a way for users to edit, add, and delete information.

Requirements

Pocket PC: Pocket PC 2000 only
Smartphone: None
OS Versions: Windows CE 2.0 and later
Header: pimstore.h
Library: pimstore.lib

See Also

Pocket Outlook Object Model API Interfaces | Pocket Outlook Object Model API Enumerations

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.