Description
reactos-bootcd-0.4.15-dev-6439-g8532f18-x86-gcc-lin-dbg
- Shortcut properties >"Open with..."
- Add a new exe to the list (nimbusnote.exe in my video)
- Well displayed
- Cancel
- Rename the exe file to something else
- Re-open "Open with..."
- File still listed while no longer exists and wrong icon used
Note this is systematic on LiveCD, without any pre-requisite action :
Video : ROS-screen0.webm
Root cause : https://git.reactos.org/?p=reactos.git;a=blob;f=dll/win32/shell32/COpenWithMenu.cpp#l864 does not handle the case where m_pAppList->GetName(pApp) fails due to : https://git.reactos.org/?p=reactos.git;a=blob;f=dll/win32/shell32/COpenWithMenu.cpp#l216
Log shows :
(dll/win32/kernel32/client/loader.c:386) LoadLibraryExW(C:\Documents and Settings\Administrator\Bureau\nimbusnote.exe) failing with status c000000f |
err:(dll/win32/shell32/COpenWithMenu.cpp:332) GetFileVersionInfoSizeW C:\Documents and Settings\Administrator\Bureau\nimbusnote.exe failed: 2 |
Expected fix : Check ExtractIconExW return value in order to manage failed load icon : openwith.patch
Note : In order to load the "default" icon, LoadIconW(shell32_hInstance, MAKEINTRESOURCEW(IDI_SHELL_DOCUMENT)); could be used rather than ExtractIconExW(L"shell32.dll", 0, NULL, &pApp->hIcon, 1) for the sake of not hardcoding shell32.dll.
On top : do not display missing applications : https://github.com/reactos/reactos/pull/5587
Patch result :
Attachments
Issue Links
- relates to
-
CORE-17817 Clean up the registry regarding OpenWithMenu for executables that we do not have
- Open
-
CORE-19122 SHGetFileInfo with SHGFI_USEFILEATTRIBUTES causes SHGFI_ICON to return the wrong class icon for .exe files
- Untriaged
-
CORE-19670 shell32: SHOpenWithDialog should set DefaultIcon on assoc change
- Untriaged