CUT_RAS::GetDevice
int GetDevice(LPRASDEVINFO rdi,DWORD index)
Parameters
rdi |
A pointer to an existing RASDEVINFO structure. |
index |
A zero-based index (0 to (GetDeviceCount()-1)). Specifies the device from which information will be retrieved. |
Return Value
UTE_SUCCESS |
Operation completed successfully. |
UTE_ERROR |
Operation failed and there is no data to be returned. |
UTE_INDEX_OUTOFRANGE |
The given index does not point to a valid device entry. |
UTE_RAS_LOAD_ERROR |
Unable to load the RAS DLLs. |
Remarks
Call this function to fill in the given RASDEVINFO structure with the specified device information. RASDEVINFO contains the device's type and name.
Refer to the MSDN library for more information on RASDEVINFO structures.
See also: EnumDevices | GetDeviceCount
Example
//retrieves and lists all available RAS devices
CComboBox* cb2 = (CComboBox*)GetDlgItem(IDC_COMBO2);
m_ras.EnumDevices();
int cnt = m_ras.GetDeviceCount();
RASDEVINFO rdi;
for( int x = 0; x < cnt; x++){
m_ras.GetDevice(&rdi,x);
cb2->AddString(rdi.szDeviceName);
}
cb2->SetCurSel(0);