delphi - Delphi:使Unicode RAR-Component 2.0

标签 delphi unicode components ansi rar

我有RAR-component 2.0和Delphi2010。此组件使用AnsiString作为文件路径。如何使其成为unicode?我在RAR.pas中将AnsiString更改为String,但没有帮助。

谢谢!

最佳答案

在RAR.pas中:


将TRARArchiveInformation的fFileName字段和Filename属性更改为WideString。
更改TRAR.OpenFile,使FileName参数为WideString。
TRAR.OpenArchive(Extract:boolean)中更改此行:

ArcName := PAnsiChar(fArchiveInformation.FileName);

对此:

ArcNameW := PWideChar(fArchiveInformation.FileName);


在RAR_DLL.pas中:

更改GetFileModifyDate,使此行:

h := OpenFile(PAnsiChar(FileName), Struct, OF_SHARE_DENY_NONE);


这是:

h := FileOpen(FileName, fmOpenRead or fmShareDenyNone);


并从var块中删除Struct: TOFSTRUCT;行。

关于delphi - Delphi:使Unicode RAR-Component 2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6323121/

相关文章:

java - 如何获取Unicode字符的基址指针?

javascript - Polymer - 动态加载不同的组件

delphi - 需要从 TImage 派生的帮助(存储图像文件的路径)

Delphi:能否在 DLL 中定义组件类并在运行时加载并创建它?

string - 是否存在unicode "New-Line"(换行符),就像unicode `space`( )一样?

javascript - Angular 与静态页面或组件? (成分太多?)

components - 如何简单地重定向到另一个顶级 Seaside 组件?

image - 如何判断照片是否损坏?

delphi - 代码重复检测 - Delphi

unicode - UTF-8编码为什么前缀10?