Open properties Dialog For A File
Collapse
X
-
if you need very much
i can create a dll for you.
it is very simple
Comment
-
-
hi
it is ok
i made your dll
i added a cool function,too
it gets information from system without opening Properties dialog
try it with mp3 jpg gif
i also added source here,for trusted software
and a delphi 7 Dll project also included in rar file
Code:library PropertiesDlg; uses ShellApi, SysUtils, ComObj; function OpenPropertiesDlg(FilePath:PChar):PChar;stdcall; var sei : TShellExecuteInfo; begin FillChar(sei,SizeOf(sei),#0); sei.cbSize:=SizeOf(sei); sei.lpFile:=PChar(FilePath); sei.lpVerb:='properties'; sei.fMask:=SEE_MASK_INVOKEIDLIST; if not ShellExecuteEx(@sei)then Result:=PChar('ERROR') [COLOR="Red"][B]{on failure return ERROR }[/B][/COLOR] else Result:=PChar('OK'); [COLOR="red"][B]{on success return OK }[/B][/COLOR] end; function GetFileProperties(FilePath:PChar):PChar;stdcall; var Props,ADir,AFile:Variant; RET:string; i:Integer; begin RET:=''; try Props := CreateOleObject('shell.application'); ADir:= Props.NameSpace(ExtractFilePath(String(FilePath))); AFile := ADir.Parsename (ExtractFileName(String(FilePath))); for i := 1 to 65 do begin RET:= RET+ADir.GetDetailsOf (AFile,i)+'|'; [COLOR="red"][B]{on success return a delimited string }[/B][/COLOR] end; except on e: Exception do RET := 'ERROR'; [COLOR="red"][B]{on failure return ERROR }[/B][/COLOR] end; Result:=PChar(RET); end; {$R *.res} exports GetFileProperties, OpenPropertiesDlg; begin end.
Comment
-
-
Originally posted by reteset View Posthi
it is ok
i made your dll
i added a cool function,too
it gets information from system without opening Properties dialog
try it with mp3 jpg gif
i also added source here,for trusted software
and a delphi 7 Dll project also included in rar file
Code:library PropertiesDlg; uses ShellApi, SysUtils, ComObj; function OpenPropertiesDlg(FilePath:PChar):PChar;stdcall; var sei : TShellExecuteInfo; begin FillChar(sei,SizeOf(sei),#0); sei.cbSize:=SizeOf(sei); sei.lpFile:=PChar(FilePath); sei.lpVerb:='properties'; sei.fMask:=SEE_MASK_INVOKEIDLIST; if not ShellExecuteEx(@sei)then Result:=PChar('ERROR') [COLOR="Red"][B]{on failure return ERROR }[/B][/COLOR] else Result:=PChar('OK'); [COLOR="red"][B]{on success return OK }[/B][/COLOR] end; function GetFileProperties(FilePath:PChar):PChar;stdcall; var Props,ADir,AFile:Variant; RET:string; i:Integer; begin RET:=''; try Props := CreateOleObject('shell.application'); ADir:= Props.NameSpace(ExtractFilePath(String(FilePath))); AFile := ADir.Parsename (ExtractFileName(String(FilePath))); for i := 1 to 65 do begin RET:= RET+ADir.GetDetailsOf (AFile,i)+'|'; [COLOR="red"][B]{on success return a delimited string }[/B][/COLOR] end; except on e: Exception do RET := 'ERROR'; [COLOR="red"][B]{on failure return ERROR }[/B][/COLOR] end; Result:=PChar(RET); end; {$R *.res} exports GetFileProperties, OpenPropertiesDlg; begin end.
Comment
-
-
Hi
it's posible read only one o varius expecifiques entries?
for example:
FileGetProductName?
or FileGetDescription
or FileGetorganization (or porducer).
This functions is avaliable in AMS, but AMS7 fails detecting this porperties of the VLC Media PLayer, AMS NOT DETECT NOTHING...
thanks
Comment
-
Comment