CUT_RAS::GetConnectionCount

Dundas

CUT_RAS::GetConnectionCount

Members | Overview

DWORD GetConnectionCount()

Return Value

The number of available connections. Returns -1 if an error occurs.

Remarks

Call this function to retrieve the number of connections found during the enumeration. EnumConnections needs to be called before this function will return any valuable information.

See also: EnumConnections | GetConnection

Example

//retrieves and displays the number of available connections

 

CComboBox* cb3 = (CComboBox*)GetDlgItem(IDC_COMBO3);

m_ras.EnumConnections();

int cnt = m_ras.GetConnectionCount();

RASCONN rc;

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

  m_ras.GetConnection(&rc,x);

  cb3->AddString(rc.szEntryName);

}

cb3->SetCurSel(0);