ImageEn, unit iexWPD

TIEPortableDevices


Declaration

TIEPortableDevices = class;


Description

An implementation of Windows Portable Devices API, which provides access to connected devices and external drives. It is used in ImageEn by the TIEDcimAcquire class for acquisition of images from devices.


Demos

Demo  Demos\ImageAcquisition\AllAcquire\AllAcquire.dpr
Demo  Demos\ImageAcquisition\PortableDevices\WPDDemo.dpr


Examples

// Navigate to folder and fill listbox with its object IDs
procedure TfrmMain.OpenFolder(const sFolderID : WideString);
var
  I: Integer;
begin
  fPortableDevices.ActiveFolderID := sFolderID;
  lbxObjects.Items.Clear;
  for I := 0 to fPortableDevices.ObjectCount - 1 do
    lbxObjects.Items.Add( fPortableDevices.Objects[ I ].ID );
end;

// Add all files in the DCIM folder and its sub-folders
if fPortableDevices.NavigateToFolderPath( 'Card\DCIM\', True, iewFile ) then
begin
  lbxObjects.Items.Clear;
  for I := 0 to fPortableDevices.ObjectCount - 1 do
    lbxObjects.Items.Add( fPortableDevices.Objects[ I ].ID );
end;

Methods and Properties


Properties
Public Property  ActiveDeviceID
Public Property  ActiveFolderID
Public Property  CanNavigateToParent
Public Property  HideEmptyDevices
Public Property  Devices
Public Property  DeviceCount
Public Property  Objects
Public Property  ObjectCount
Public Property  LastError
Public Property  Sorted

Methods
Public Method  Create
Public Method  Destroy
Public Method  Cancel
Public Method  CopyFileToDevice
Public Method  CopyFileFromDevice
Public Method  CopyStreamFromDevice
Public Method  CreateFolderOnDevice
Public Method  DeleteFromDevice
Public Method  DeviceIDToIndex
Public Method  FilenameToIndex
Public Method  FindFilesByName
Public Method  FindFilesOfType
Public Method  GetObjectAdvancedProps
Public Method  ObjectIDToIndex
Public Method  ObjectIsFolder
Public Method  LookupDeviceFriendlyName
Public Method  LookupDeviceID
Public Method  LookupObjectFriendlyName
Public Method  NavigateToFolderID
Public Method  NavigateToFolderPath
Public Method  NavigateToParent
Public Method  RefreshDevices
    
Events
Event  OnLog