Menu ▾ ▴

#601 TShell::SHGetFileInfo truncates return value

8
pending
1
2025-04-16
2025-04-15
No

TShell::SHGetFileInfo delay links the underlying Windows API function SHGetFileInfo. However, the return types do not match. TShell::SHGetFileInfo uses DWORD, while the Windows API function uses DWORD_PTR.

In case the uFlags parameter is set to SHGFI_SYSICONINDEX, the function returns a handle to the system image list, which in case of TShell::SHGetFileInfo will be truncated to 32-bit in 64-bit build mode (which sounds and is bad in terms of good programming practice, but Windows allows truncation of 64-bit handles, so truncation here should be harmless).

Related

Wiki: OWLNext_8_Series_Revision_History

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2025-04-16
    • status: open --> pending
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2025-04-16

    A fix for this issue has now been committed on the trunk [r7679].

    As a collateral change, TShellItem::GetExeType has been refactored [r7680].

     

    Related

    Commit: [r7679]
    Commit: [r7680]


Log in to post a comment.