Export (0) Print
Expand All
Expand Minimize

Calling Card

Windows Mobile 6.5
4/8/2010

This code sample is named CallingCard. It demonstrates how to create an application that allows a user to make a calling-card phone call directly from the Contacts screen.

Feature Area

Phone Features Networking - Core

Relevant APIs

IContextMenu::QueryContextMenu function

PhoneMakeCall function

Phone API Reference

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 Mobile 6.5.3 DTK\Samples\Common\CPP\Win32\CallingCard

    Microsoft Visual Studio launches and loads the solution.

  2. Build the solution (Ctrl+Shift+B).

  3. Deploy the solution (F5).

  4. Run the generated CAB file on the mobile device.

  5. Reboot the mobile device so that the settings take effect.

If you have not installed the SamplePrivDeveloper certificate, you will need to so that your Dll and CAB projects are signed correctly.

To install the certificate from the windows desktop
  1. Click Start > Run.

  2. Type the path-name to SamplePrivDeveloper.pfx certificate, and click OK. By default, this is located in the following folder:

    C:\Program Files\Windows Mobile 6.5.3 DTK\Tools\Security\SDK Development Certificates

  3. Double-click the SamplePrivDeveloper.pfx certificate icon. The Certificate Import Wizard appears.

  4. Click Next. The certificate path-name is filled-in.

  5. Click Next.

  6. Click Next (you do not need a password).

  7. Click Next. Accept the default options; automatically select the certificate store based on certificate type.

  8. 9. Click Finish.

See Mobile device Security Model for further details on how to install the SDK certificates onto the mobile device, and how to use the privileged SDK certificate to sign this application.

The calling-card registry settings are automatically provisioned by the CAB file. They are stored under the following registry key:

HKCU\Software\Microsoft\CallingCard

There are four values under this key:

Number

[REG_SZ] The calling-card phone number.

Pin

[REG_SZ] The calling-card Personal Identification Number (PIN). This must be a numeric value.

Pause1

[REG_DWORD] The number of pauses between connecting to the calling-card service and the prompt for the PIN. Each pause is about two seconds long. A value of zero indicates that the phone application will wait for you to press Talk before sending the PIN.

Pause2

[REG_DWORD] The number of pauses between inputting the PIN and the prompt for the number being dialed. Each pause is about two seconds long. A value of zero indicates that the phone application will wait for you to press Talk before sending the PIN.

SDK: Windows Mobile Professional SDK and Windows Mobile Standard SDK

Development Environment: Visual Studio 2005 or 2008.

ActiveSync: Version 4.5.

On a CDMA network, Pause1 should be zero because the phone transitions immediately into the Connected state.

You must press Talk to send the PIN to the calling card system.

The entire dial string is stored in the phone call history as clear text. Hence, there is no point in encrypting the PIN in the registry.

If any of these registry settings is missing or invalid, the softkey or context menus will not contain the new calling-card menu options.

You must install the SamplePrivDeveloper.pfx certificate so that your DLL and CAB projects are signed correctly.

It is assumed that the DLL is registered as a Contacts Menu Extension, and that the calling-card registry settings are stored in:

HKCU\Software\Microsoft\CallingCard

Community Additions

ADD
Show:
© 2014 Microsoft