ShellExecuteEx 获取文件属性

功能说明:获取文件属性 

uses ShellApi;

procedure TForm1.Button1Click(Sender: TObject);
var
  filename :string;
  sei : TShellExecuteInfo;
begin
  if opendialog1.Execute then
    begin
        filename:=opendialog1.FileName;
        FillChar(sei,SizeOf(sei),#0);
        sei.cbSize:=SizeOf(sei);
        sei.lpFile:=PChar(filename);
        sei.lpVerb:='properties';
        sei.fMask:=SEE_MASK_INVOKEIDLIST;
        ShellExecuteEx(@sei);
    end;

end;




posted @ 2012-06-02 10:10  XE2011  阅读(152)  评论(0编辑  收藏  举报