function SaveFileInfo(Filename:
string; mal: TMultipleArrayList): Boolean;
begin
result := SetMultipleFileSummaryInfo(Filename, FMTID_SummaryInformation,
mal);
end;
function FillFileInfoArray(StringGrid: TStringGrid): TMultipleArrayList;
begin
SetLength(result, StringGrid.RowCount);
with StringGrid
do
begin
result[0].pidInfoStr := PChar(Cells[1, 0]);
result[0].pidInfoType := PIDSI_TITLE;
result[1].pidInfoStr := PChar(Cells[1, 1]);
result[1].pidInfoType := PIDSI_SUBJECT;
result[2].pidInfoStr := PChar(Cells[1, 2]);
result[2].pidInfoType := PIDSI_KEYWORDS;
result[3].pidInfoStr := PChar(Cells[1, 3]);
result[3].pidInfoType := PIDSI_COMMENTS;
result[4].pidInfoStr := PChar(Cells[1, 5]);
result[4].pidInfoType := PIDSI_TEMPLATE;
result[5].pidInfoStr := PChar(Cells[1, 5]);
result[5].pidInfoType := PIDSI_AUTHOR;
result[6].pidInfoStr := PChar(Cells[1, 6]);
result[6].pidInfoType := PIDSI_REVNUMBER;
end;
end;
procedure TForm1.btnSaveClick(Sender: TObject);
var
FileFolder:
string;
mal: TMultipleArrayList;
resourcestring
rsNoFile = '
Keine Datei ausgewählt';
begin
mal :=
nil;
try
FileFolder := ShellListView1.Folders[FLastItem].PathName;
SetLength(mal, StringGrid1.RowCount);
mal := FillFileInfoArray(StringGrid1);
SaveFileInfo(FileFolder, mal);
except
MessageBox(
Handle, PChar(rsNoFile), APPNAME, MB_ICONWARNING);
end;
end;