Opening a CHM file produces: “navigation to the webpage was canceled”

前端 未结 9 1133
有刺的猬
有刺的猬 2020-12-04 16:26

I am trying to open a .chm file.

I downloaded the source, extracted it, and double clicked on Waffle.chm and clicked \"Open\" but no matter what element

9条回答
  •  一整个雨季
    2020-12-04 17:07

    In addition to Eric Leschinski's answer, and because this is stackoverflow, a programmatical solution:

    Windows uses hidden file forks to mark content as "downloaded". Truncating these unblocks the file. The name of the stream used for CHM's is "Zone.Identifier". One can access streams by appending :streamname when opening the file. (keep backups the first time, in case your RTL messes that up!)

    In Delphi it would look like this:

    var f : file;
    begin
     writeln('unblocking ',s);
     assignfile(f,'some.chm:Zone.Identifier');
     rewrite(f,1);
     truncate(f);
     closefile(f);
    end;
    

    I'm told that on non forked filesystems (like FAT32) there are hidden files, but I haven't gotten to the bottom of that yet.

    P.s. Delphi's DeleteFile() should also recognize forks.

提交回复
热议问题