New Messaging Transport
Send FeedbackThis code sample is named TransportDemo. It demonstrates how to create a custom messaging transport for Pocket PC.
Feature Area
Relevant APIs
- Messaging API (MAPI) API
- IMailSyncHandler interface
- IMailSyncCallBack interface
Usage
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\TransportDemo\TransportDemo.slnMicrosoft Visual Studio 2005 launches and loads the solution.
- Build the solution (Ctrl+Shift+B).
- Deploy the solution (F5).
To install the transport using a CAB
- Copy the installation CAB to the My Documents folder in the Windows Mobile Emulator. You will need to use the Remote File Viewer tool.
- In the emulator, click Start > Programs > File Explorer > My Documents > TransportDemoSetup.cab. Wait for the installation to complete.
- Start the Messaging application (Start > Messaging).
- Create a new account (Menu > Tools > New Account).
- Enter an e-mail address that uses the custom transport.
- Click Next.
- Click Next.
- Enter the username and password for the email account using the custom transport.
- Click Next.
- Select the Custom Transport from the Account Type drop down.
- Complete the remainder of the e-mail setup according to the custom transport messaging account settings.
To manually install the transport (without using a CAB)
- Copy the transport DLL to the
\Windowsdirectory on the mobile device or in the emulator. - Set these registry keys using the Remote Registry Editor tool. Note that the key name "TransportDemo" must match the value for "Name" here.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\TransportDemo] "Name"="TransportDemo" "DLL"="TransportDemo.dll" "Port"=dword:00000000
- Start the messaging application (Start > Messaging).
- Create a new account (Menu > Tools > New Account).
- Enter an e-mail address that uses the custom transport.
- Click Next.
- Click Next.
- Enter the username and password for the email account using the custom transport.
- Click Next.
- Select the Custom Transport from the Account Type drop down.
- Complete the remainder of the e-mail setup according to the custom transport messaging account settings.
When you build the solution, a setup file is created. You can launch it to configure all of the registry settings, and install the DLL.
To install the transport using the generated INF file
- On your workstation, navigate to the subfolder:
\Transportdemo\Transportdemosetup\Debug\. - Double-click the file
TransportDemoSetup.inf.
Remarks
The transport in this code sample does not actually synchronize e-mail using a protocol. It just demonstrates how to construct a messaging transport.
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 | Messaging Transports | How to: Register Customized Messaging Transports
Send Feedback on this topic to the authors
© 2006 Microsoft Corporation. All rights reserved.