Export (0) Print
Expand All
Expand Minimize

Register a Source Provider

Windows Mobile 6.5
4/8/2010

This code sample is named PimExProvider. It demonstrates how to register a source provider for the Contact and Calendar applications.

The source provider implements 3 features:

  • Paints the contact's picture in the Contact application list-view.
  • Creates a custom Summary tab to display the Contact item.
  • Changes the background color of an Appointment item in the Agenda, Day, and Week views.

To run the code sample
  1. Navigate to the solution file (*.sln), and double-click it. By default, the solution file is copied to the following folder:

    C:\Program Files\Windows Mobile 6.5.3 DTK\Samples\PocketPC\CPP\win32\PimExProvider

    Visual Studio launches and loads the solution.

  2. Build the solution (Ctrl+Shift+B).

  3. Deploy the solution (F5).

To register and use the application
  1. Create a few Contact items with pictures.

  2. Create and a few Appointment items.

  3. Halt the "poutlook.exe" process. You can do this using the Remote File Viewer tool.

  4. Call "regsvrce pimexprovider.dll". This is done automatically when you deploy the project.

  5. Re-launch the Contacts and/or Calendar application to see the customizations.

Source Providers and their associated Source IDs are part of a mechanism that supports per-provider customization of the PIM experience on mobile devices.

A Source Provider is a custom function that customizes the PIM user experience. Typically, a Source Provider has a corresponding associate function that is responsible for synchronizing PIM data with the mobile device. Data synchronized with the mobile device by this associate function is marked with a Source identification tag (Source ID). When Outlook Mobile displays a PIM item, it checks to see if the item has a Source ID. If it finds one, it invokes the Source Provider, which customizes the user interface for the PIM item.

In addition, when the user enters new PIM data on the mobile device, they will be able to select the Source Provider to use.

PIM items with a Source ID value of zero just use the default user interface.

This code sample updates the Source ID for all existing Contact and Appointment items in the store.

These updates are reverted when the DLL is un-registered.

Windows Mobile Professional SDK

Windows Mobile Standard SDK

Visual Studio 2005 or 2008.

ActiveSync 4.5.

Community Additions

ADD
Show:
© 2014 Microsoft