I have RAR-component 2.0 and Delphi 2010. This component uses AnsiString for File Path. How can I make it unicode? I changed AnsiString to String in RAR.pas but it did not help.
Thanks!
In RAR.pas:
fFileName
field and the Filename
property to WideString.TRAR.OpenFile
so the FileName
argument is a WideString.In TRAR.OpenArchive(Extract:boolean)
change this line:
ArcName := PAnsiChar(fArchiveInformation.FileName);
to this:
ArcNameW := PWideChar(fArchiveInformation.FileName);
In RAR_DLL.pas:
Change GetFileModifyDate
so this line:
h := OpenFile(PAnsiChar(FileName), Struct, OF_SHARE_DENY_NONE);
is this:
h := FileOpen(FileName, fmOpenRead or fmShareDenyNone);
and remove the Struct: TOFSTRUCT;
line from the var block.