PhoneAddSpeedDial
4/8/2010
This function adds an entry to the speed dial list.
Syntax
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
Header | phone.h |
Library | phone.lib |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |
See Also
Reference
CALLLOGFILTER
PhoneGetCallLogEntry
PhoneOpenCallLog
PhoneSeekCallLog
Phone Functions