TIEPortableDevices.DeviceCount
Declaration
property DeviceCount : Integer; (read-only)
Description
Returns the number of devices in the
device list.
// Refresh the list of devices
procedure TfrmMain.RefreshDeviceList();
var
I: Integer;
begin
lbxObjects.Items.Clear;
if fPortableDevices.RefreshDevices = False then
raise Exception.create( 'Unable to get devices: ' + fPortableDevices.LastError);
lbxDevices.Items.Clear;
for I := 0 to fPortableDevices.DeviceCount - 1 do
lbxDevices.Items.Add( fPortableDevices.Devices[ I ].ID );
end;