ImageEn, unit iexWPD

TIEPortableDevices.GetObjectAdvancedProps

TIEPortableDevices.GetObjectAdvancedProps


Declaration

function GetObjectAdvancedProps(const sDeviceID, sObjectID: WideString; out DestProps : TIEWPDObjectAdvancedProps): Boolean; overload;
function GetObjectAdvancedProps(const sObjectID: WideString; out DestProps : TIEWPDObjectAdvancedProps): Boolean; overload;
function GetObjectAdvancedProps(Index: Integer; out DestProps : TIEWPDObjectAdvancedProps): Boolean; overload;


Description

Returns more detail about an object on the device, such as its size, date, etc. You can specify either the ID of an object on the active device or its index in the Objects list.

Result is false if retrieval of details failed.


Example

procedure TfrmMain.btnShowObjectPropsClick(Sender: TObject);
var
  aProps: TIEWPDObjectAdvancedProps;
begin
  if IEPortableDevices.GetObjectAdvancedProps( SelectedObjectID, aProps ) = False then
    raise Exception.create( 'Cannot access object properties' );

  memInfo.Clear;
  memInfo.Lines.Add( 'WPD_OBJECT_ID: ' + aProps.ObjectID );
  memInfo.Lines.Add( 'WPD_OBJECT_PARENT_ID: ' + aProps.ParentID );
  memInfo.Lines.Add( 'WPD_OBJECT_NAME: ' + aProps.ObjectName );
  memInfo.Lines.Add( 'WPD_OBJECT_PERSISTENT_UNIQUE_ID: ' + aProps.PersistentUniqueID );
  memInfo.Lines.Add( 'WPD_OBJECT_FORMAT: '+ IntToStr( ord( aProps.ObjectFormat )));
  memInfo.Lines.Add( 'WPD_OBJECT_CONTENT_TYPE: '+ IntToStr( ord( aProps.ContentType )));
  memInfo.Lines.Add( 'WPD_OBJECT_ISHIDDEN: ' + BoolToStr( aProps.IsHidden ));
  memInfo.Lines.Add( 'WPD_OBJECT_ISSYSTEM: ' + BoolToStr( aProps.IsSystem ));
  memInfo.Lines.Add( 'WPD_OBJECT_DATE_CREATED: ' + DateTimeToStr( aProps.DateCreated ));
  memInfo.Lines.Add( 'WPD_OBJECT_DATE_MODIFIED: ' + DateTimeToStr( aProps.DateModified ));
end;