PhoneAddSpeedDial

Send Feedback

This function adds an entry to the speed dial list.

HRESULT PhoneAddSpeedDial(
   DWORD dwFlags, 
   DWORD* piKey, 
   const TCHAR* pszDisplayName, 
   const TCHAR* pszTelNumber
);

Parameters

  • [in] dwFlags
    Undefined. Set to 0.
  • [in] piKey
    The key sequence which will dial the new entry. If a speed dial entry already exists with the same key sequence, it will be overwritten.
  • [in] pszDisplayName
    The display name of the speed dial entry to be added. Must be a non-empty string.
  • [in] pszTelNumber
    The telephone number of the speed dial entry to be added.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The method completed successfully.

Code Example

The following code example demonstrates how to use PhoneAddSpeedDial.

Note   To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

BOOL CreateSpeedDialEntry()
{

    // The slot number in the speed dial can be any number between 2 and 99.
    DWORD dwKey           = 7;
    TCHAR szName[]        = _T("Adams Terry");
    TCHAR szPhoneNumber[] = _T("425 555-0100");

    // Add the entry "Adams Terry", with the phone number "425 555-0100", to slot #7.
    HRESULT hr = PhoneAddSpeedDial(0, &dwKey, szName, szPhoneNumber);

    return (hr == S_OK);

}

Requirements

Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later.
Header: phone.h
Library: phone.lib

See Also

CALLLOGFILTER | PhoneGetCallLogEntry | PhoneOpenCallLog | PhoneSeekCallLog | Phone Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.