I used Everything.DllWrapper.pas (by Christian.Ziegelt) and Everything32.dll in my Delphi project (in Delphi 12):
I used this query:
ext:png snag 2025 dm:last2days
In the Everything GUI I got these results:
And in my Delphi app I got these results:
You can see that the last character from the result paths are truncated! This happens with every similar query in my test app!
I can exclude any error in my Delphi app - here's the analysis:
Consistent Pattern: The exact same problem occurs as with .txt files: the last character of the full path/filename is being truncated when retrieved via the Everything DLL in my Delphi application.
Everything GUI is Correct: The Everything GUI application itself retrieves and displays the filenames correctly, ending in .png.
Delphi Code Already Vetted: My previous analysis with CodeSite logs showed that my Delphi code correctly captures the string length (CharsCopied) returned by the DLL and sets the Delphi string length accordingly. The truncation was happening before the SetLength call (i.e., the DLL was providing the truncated string and/or an incorrect CharsCopied value).
Problem Source Confirmed: This confirms that the issue lies specifically within the Everything_GetResultFullPathNameW function of the Everything SDK DLL. It is inconsistently returning truncated strings under certain conditions when called via the API, even though the main Everything application does not exhibit this behavior.
Found a bug in the SDK DLL?
-
PeterPanino
- Posts: 90
- Joined: Sun Feb 21, 2016 10:26 pm
Re: Found a bug in the SDK DLL?
I have now solved the problem: There really seems to be a bug in Everything_GetResultFullPathNameW.
So I now use Everything_GetResultPathW and Everything_GetResultFileNameW and combine them with System.IOUtils.TPath.Combine to get the correct results:
Here is the source code of the new working version:
So I now use Everything_GetResultPathW and Everything_GetResultFileNameW and combine them with System.IOUtils.TPath.Combine to get the correct results:
Here is the source code of the new working version: