TIEPortableDevices.Devices
Declaration
property Devices[Index: Integer]: TIEPortableDevice; (read-only)
Description
An array of all devices connected to the PC. It is filled automatically or can be refreshed by calling
RefreshDevices.
// 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;