CUT_RAS::EnumEntries
int EnumEntries()
Return Value
UTE_SUCCESS |
Operation completed successfully. |
UTE_RAS_ENUM_ERROR |
Enumeration error occurred (see GetLastRASError for more details). |
UTE_RAS_LOAD_ERROR |
Unable to load the RAS DLLs. |
Remarks
Call this function to enumerate all of the phonebook entry names for the main phonebook (this free version of the CUT_RAS class only supports the main phonebook) and stores them in an internal array of RASENTRYNAME structures.
Once enumerated the data can be retrieved by using the GetEntryCount and GetEntry functions. EnumEntries MUST be called for these functions to succeed.
Refer to the MSDN library for more information on the RASENTRYNAME structure.
See also: GetEntryCount | GetEntry
Example
//enumerates all main phonebook entries
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);