Décompilation des fichiers chm
Décompilation des fichiers chm
Code:
1 2 3 4 5
| procedure Decompile_Chm(const Source,Dest:string);
begin
if FileExists(Source)and DirectoryExists(Dest) then
ShellExecute(0,'Open','hh.exe',PChar('-decompile '+Dest+' '+Source),nil,0)
end; |
utilisation
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| uses ShellApi;
procedure Decompile_Chm(const Source,Dest:string);
begin
if FileExists(Source)and DirectoryExists(Dest) then
ShellExecute(0,'Open','hh.exe',PChar('-decompile '+Dest+' '+Source),nil,0)
end;
procedure TForm1.Button1Click(Sender: TObject);
var
S,D:string;
begin
if not PromptForFilename(S,'Fichiers *.chm|*.chm') then Exit;
D:=S+'_decompiled';
if not CreateDir(D)then Exit;
Decompile_Chm(S,D);
end; |