CUT_RAS::EnumConnections
int EnumConnections()
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 running RAS connections and
store them in an internal array of RASCONN structures.
Once enumerated the data can be retrieved by using the GetConnectionCount
and GetConnection functions. EnumConnections
MUST be called for these functions to succeed.
See also: GetConnection | GetConnectionCount
Example
//retrieves all available RAS connections
CComboBox* cb3 = (CComboBox*)GetDlgItem(IDC_COMBO3);
m_ras.EnumConnections();
int cnt = m_ras.GetConnectionCount();
RASCONN rc;
for(x = 0; x < cnt; x++){
m_ras.GetConnection(&rc,x);
cb3->AddString(rc.szEntryName);
}
cb3->SetCurSel(0);