CUT_RAS::EnumDevices

Dundas

CUT_RAS::EnumDevices

Members | Overview

in EnumDevices()

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 available RAS dialup devices. Stores the devices in an internal array of RASDEVINFO structures. Once it is enumerated the data can be retrieved by using the GetDeviceCount and GetDevice functions. EnumDevices MUST be called for these functions to succeed.

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

See also: GetDeviceCount | GetDevice

Example

 

//retrieve all available dialup devices

CComboBox* cb2 = (CComboBox*)GetDlgItem(IDC_COMBO2);

m_ras.EnumDevices();

cnt = m_ras.GetDeviceCount();

RASDEVINFO rdi;

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

m_ras.GetDevice(&rdi,x);

cb2->AddString(rdi.szDeviceName);

}

cb2->SetCurSel(0);