Set Message Store Properties
This code sample is named Mailset. It demonstrates how to retrieve and set properties on a message store. The application reads the contents of an XML file named mailset.xml, which contains a list of MAPI properties (for example, PR_CE_AGE_FILTER, PR_CE_INCOMING_SERVER, and PR_CE_DOMAIN) that you can change.
Feature Area
Relevant APIs
- Messaging API (MAPI) API
- IMAPISession interface
- IMAPITable interface
- IMAPIProp::GetProps method
- IMAPIProp::SetProps method
Usage
To run the code sample
Navigate to the solution file (*.sln), and double-click it. By default, the solution files are copied to the following folders:
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Mailset\``mailset.sln
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Samples\CPP\Win32\Mailset\``mailset.sln
Microsoft Visual Studio 2005 launches and loads the solution.
Build the solution (Ctrl+Shift+B).
Deploy the solution (F5).
To use the application
- Copy the XML file mailset.xml and the executable file "MailSet.exe" to the same directory on the mobile device.
- Execute "MailSet.exe".
Remarks
You have at least one message account (SMS, ActiveSync) set up.
The XML document has the following format:
<store proptag="0x811A000B" propname="PR_CE_USE_SIGNATURE" display="Use the account signature" default="0" type="2"/>
where:
proptag
The numeric value of the property.propname
The name of this property.display
A friendly description of this property.default
The default value of this property to use if it is not in the store.type
The type of the property, where:0 = String
1 = Integer
2 = Boolean
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 | MAPI Properties | Windows Mobile Defined MAPI Properties
Send Feedback on this topic to the authors