Hi Support,
As you did not reproduce we spent some times to analyze the sources. Here is our feedbacks.
---- OLE ERROR ----
In TCustomExplorerTreeview.LoadDirectoryStructure, you process "desktop" and "myComputer" cases.
For each case, there are 2 SHGetFileInfo calls:
- 1st for getting display name
- 2nd for getting icon
The issue occurs on first call where there are many flags used including SHGFI_EXETYPE and SHGFI_SYSICONINDEX.
According to Microsoft Doc, both flags modify the return value. So I suppose that when using these flags, the OleCheck should not be used as in these cases the result is not sucess/error but exetype or index.
By the way, you don't use OleCheck for the second call when really getting the icon.
In addition:
- Is it really necessary to use SHGFI_EXETYPE, SHGFI_SYSICONINDEX, SHGFI_ICON, SHGFI_SMALLICON, ... for getting only the szDisplayName ?
- In the Microsoft Doc, regarding SHGFI_EXETYPE : "This flag cannot be specified with any other flags."
---- Access violation when clicking "chevron" to navigate ----
It seems to happen where you use Tag to save TAdvTreeNode pointer ( AdvExplorerTreeview, lines 7428, 7445, 7457, ... ). Pointer is cast to Integer instead of NativeInt.
This is not correct and since Delphi 11.1, ASLR is enabled. As a consequence, it is more easy or even systematic to have pointer bigger than Max(Integer).
I hope this help.
Best regards,
Nicolas