Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#3

Re: Erweiterte Dateiinformationen schreiben

  Alt 15. Apr 2004, 12:57
Wie wäre es mit denen hier:
Delphi-Quellcode:
  OleCheck(StgOpenStorageEx(PWideChar(FileName),
  STGM_READ or STGM_SHARE_DENY_WRITE,
  STGFMT_FILE,
  0, nil, nil, @IID_IPropertySetStorage, stg));

  PropSetStg := Stg as IPropertySetStorage;

  OleCheck(PropSetStg.Open(FmtID_SummaryInformation,
     STGM_READ or STGM_SHARE_EXCLUSIVE, PropStg));

  OleCheck(PropStg.Enum(PropEnum));
Und der Schleife:
Delphi-Quellcode:
  hr := PropEnum.Next(1, PropStat, nil);
   while hr = S_OK do
   begin
     inc(I);
     SetLength(PropSpec,I);
     PropSpec[i-1].ulKind := PRSPEC_PROPID;
     PropSpec[i-1].propid := PropStat.propid;
     hr := PropEnum.Next(1, PropStat, nil);
  end;
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat