CUT_RAS::GetEntryPhoneNumber

Dundas

CUT_RAS::GetEntryPhoneNumber

Members | Overview

int GetEntryPhoneNumber(LPCSTR szEntryName, LPSTR szPhoneNumber, long nPhoneNumberLen, LPSTR szAreaCode, long nAreaCodeLen)

Parameters

szEntryName

The desired phonebook entry.

szPhoneNumber

Pointer to a string buffer that will store the retrieved phone number.

nPhoneNumberLen

Length of the szPhoneNumber buffer.

szAreaCode

Pointer to a string buffer that will store the retrieved area code.

nAreaCodeLen

Length of the szAreaCode buffer.

Return Value

UTE_SUCCESS

Operation completed successfully.

UTE_ERROR

Function failed (see GetLastRASError for more details).

UTE_RAS_LOAD_ERROR

Unable to load the RAS DLLs.

Remarks

Retrieves the main phonebook number and area code for the given phonebook entry. This function reduces the amount of work required to retrieve a phone number compared to using the GetEntryProperties function directly.

See also:  GetEntryProperties

Example

 

// retrieves an entry phone number and displays it if the number was successfully retrieved

if (m_pRas->GetEntryPhoneNumber( m_szEntryName,szTemp,sizeof(szTemp),szAreaCode,sizeof(szAreaCode) ) == UTE_SUCCESS)

{

SetDlgItemText(IDC_PHONE_NUMBER,szTemp);

SetDlgItemText(IDC_AREA_CODE,szAreaCode);

}