CUT_RAS::GetEntryCount

Dundas

CUT_RAS::GetEntryCount

Members | Overview

DWORD GetEntryCount()

Return Value

DWORD

Number of available phonebook entries, or -1 if an error occurs.

Remarks

Returns the number of phonebook entries. EnumEntries MUST be called before this function will return any valuable information.

Refer to the MSDN library for more information on RASDEVINFO structures.

See also:  GetEntry | EnumEntries

Example

//retrieves phonebook entries and displays them

CComboBox* cb = (CComboBox*)GetDlgItem(IDC_COMBO1);

m_ras.EnumEntries();

int cnt = m_ras.GetEntryCount();

RASENTRYNAME ren;

for(int x = 0; x < cnt; x++){

m_ras.GetEntry(&ren,x);

cb->AddString(ren.szEntryName);

}

cb->SetCurSel(0);