ok, I had done my software with TFindFileW. Whew...
However, your FindFileW.pas is stil lack of some changes.
Around line 991:
- Code: Select all
Result := ExpandUNCFileName(Trim(Result));
{$IFDEF COMPILER7_UP}
Result := IncludeTrailingPathDelimiter(Result);
{$ELSE}
Result := IncludeTrailingBackslash(Result);
The corrections:
IncludeTrailingPathDelimiter -> WideIncludeTrailingPathDelimiter
IncludeTrailingBackslash -> WideIncludeTrailingBackslash
But for "ExpandUNCFileName", I couldn't find the TTnt version, so I change it with "WideExpandFileName" for temporary. I' was thinking to create the unicode version of "ExpandUNCFileName" from delphi source code, but it's too hard, the code involves some windows network API functions. Could you help me with this?
I also replaced all words of "TFindFile" to "TFindFileW". Especially in this line:
- Code: Select all
RegisterComponents('Delphi Area', [TFindFile]);
so I can have 2 TFindFile in the pallete.
My modified FindFileW.pas is in attachment.
I have some questions:
* The "Threaded" property of TFindFile, if I set it to true, does it make the finding process more faster?
* I found out that some delphi 7 functions from system & sysutils unit such as: Delete, Copy, StrToIntDef, etc, can accept widestring whereas the delphi 7 help doesn't mention the functions support widestring input. Could you give me explanation about this?
* The unicode text couldn't displayed correctly when I use function ShowMessage, where MessageBoxW could. The unicode char was showed as question mark, i.e. C:\???\. I saw in the delphi 7 documentation, the function showmessage has the overloaded version that accept widestring. I've already tried to type-cast the input, i.e.: Showmessage(WideString(str)), but still no avail. Do you know what's the cause?
Thx in adv,
Keep up the good work.