Register a Source Provider
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.
- CEPROPVAL structure
- IPimSrcContactListIcon::Paint method
- IPimSrcContactSummaryCard::Display method
- PIMSRC_COLOR enumeration
- Source Provider Customization Type flags
To run the code sample
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.
Build the solution (Ctrl+Shift+B).
Deploy the solution (F5).
To register and use the application
- Create a few Contact items with pictures.
- Create and a few Appointment items.
- Halt the "poutlook.exe" process. You can do this using the Remote File Viewer tool.
- Call "regsvrce pimexprovider.dll". This is done automatically when you deploy the project.
- Relaunch the Contacts and/or Calendar application to see the customizations.
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.
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.
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