TIEPortableDevices.RefreshDevices
 
Declaration
function RefreshDevices() : Boolean;
Description
Forces a recheck for connected devices.
The 
device list is filled automatically, but will not detect newly connected or disconnected devices. Calling 
RefreshDevices will force the list to be refreshed.
Result is false if an error was detected. You can check 
LastError for detail on the failure.
// 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;