Export (0) Print
Expand All

Register a Source Provider

Send Feedback

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 Card to display the Contact item.
  • Changes the background color of an Appointment item in the Agenda View.

Feature Area

Relevant APIs

Usage

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 CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\PimExProvider\PimExProvider.sln

    Microsoft Visual Studio 2005 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. Relaunch the Contacts and/or Calendar application to see the customizations.

Remarks

Source Providers and their associated Source ID's 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.

Requirements

Pocket PC SDK: Windows Mobile 5.0 Pocket PC SDK.
Smartphone SDK: Windows Mobile 5.0 Smartphone SDK.
Development Environment: Visual Studio 2005.
ActiveSync: Version 4.0.

See Also

Code Samples | Customize the PIM Experience with Source Providers | Source Provider Customization Type Flags | Source Provider PIM Type Ownership Flags | Customize an Appointment Item's Background Color | IPimSrcContactSummaryCard::Display | IPimSrcContactListIcon::Paint | PIMSRC_COLOR | CEPROPVAL


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft