如何用delphi提取Word、excel文档和Mp3文件的作者等信息。

解决方案 »

  1.   

    引用ShellAPI
    里边有几个函数,我想应该可以SHGetFileInfo,SHGetFileInfoA,SHGetFileInfoW但我试了一下,只得到了一些没什么用的信息
    procedure getshellinfo(a:tfilename;var name,typ:string;var attr:integer);
    var
      info : tshfileinfo;
    begin
      fillchar(info,sizeof(tshfileinfo),0);
         shgetfileinfo(pchar(a),0,info,sizeof(info),shgfi_displayname or  shgfi_typename or
         shgfi_icon or shgfi_attributes);
    with info do begin
              name := szdisplayname;
              typ  := sztypename;
              attr        := dwattributes;
         end;
    end;procedure TForm1.Button1Click(Sender: TObject);
    var
      name,typ:string;
      attr:integer;
    begin
      getshellinfo('E:\AA.doc', name,typ,icon,attr) ;
      showmessage(name);
      showmessage(typ);
    end;
      

  2.   

    基础信息都能得到,问题在于如何得到word中文件菜单下的文件属性中的所有信息。