Share via


Parameter Query Example

4/8/2010

This example queries the IMAP account of the first example for the service name, service type, and incoming server parameters, showing how to query an existing account to capture any parameter individually (both standard and nonstandard).

Note

Braces {} are required around the GUID in the EMAIL2 Configuration Service Provider. For example, if the GUID is "C556E16F-56C4-4edb-9C64-D9469EE1FBE0," you would change <characteristic type="{GUID}" to <characteristic type="{C556E16F-56C4-4edb-9C64-D9469EE1FBE0}"

Code Example

<characteristic type="EMAIL2">
   <characteristic type="{D671C70B-8EE3-4881-8045-2AEE6F731B55}">
      <parm-query name="SERVICENAME"/>
      <parm-query name="SERVICETYPE"/>
      <characteristic type="TAGPROPS">
         <parm-query name="0x8125001F"/>
      </characteristic>
   </characteristic>
</characteristic>

Remarks

One provisioning XML file typically contains configuration information for multiple Configuration Service Providers. To use this example, you must replace the values as appropriate, and add the node as a child of the OMA Client Provisioning file. For information about the syntax of this file, see OMA Client Provisioning Files. For examples, see OMA Client Provisioning XML File Examples.

In Windows Mobile Version 5.0 and later, CEMAPI Named Properties were replaced with fixed Property Tag Identifiers, which are defined in the Cemapi.h header file. These nonstandard extensions to MAPI are distinguished from desktop MAPI properties by the CE moniker. Hence, the named property TMAIL:IncomingServer is now PR_CE_INCOMING_SERVER. This CEMAPI property is defined in the Cemapi.h header file as follows:

// Mail server for receiving mail.
#define PR_CE_INCOMING_SERVER       PROP_TAG (PT_UNICODE, 0x8125)

In the Parameter Query Example, <parm-query name="0x8125001F"/> was created by combining the Property ID (0x8125), with the Property Type (PT_UNICODE)—in the same way that the PROP_TAG macro would. This results in a DWORD value with the HIWORD containing 0x8125, and the LOWORD containing 0x001F, which gives PR_CE_INCOMING_SERVER** a value of 0x8125001F. For more information, see MAPI Properties.**

See Also

Tasks

EMAIL2 Configuration Service Provider Examples for OMA Client Provisioning

Reference

EMAIL2 Configuration Service Provider

Other Resources

MAPI Properties