- Delete our shdocvw.dll, shell32.dll, shlwapi.dll from system32.
- Copy MS duser.dll, linkinfo.dll, shdocvw.dll, shell32.dll, shlwapi.dll there.
- Register shdocvw.dll and shell32.dll via regsvr32 /i dllname.dll command.
- Reboot the system.
After reboot, only taskbar with Start Menu will be visible. All other stuff will not work properly (desktop icons, context menus, explorer windows etc). However, taskbar works nearly without problems, same as if don't replace any dlls from Windows.
In MS_shell32_no_classes_before.log appear the following lines when opening any other window besides explorer (e. g. taskmgr):
According to the browseui classes table from https://www.geoffchappell.com/studies/windows/ie/browseui/classes/index.htm, it's CUserAssist class, which contains IUserAssist interface. So this stuff seems to be required by MS shell32.dll in order to load the desktop properly. Our browseui.dll indeed currently has no this class at all.
In this case, the classes are registered, but our browseui.dll fails to properly load them, because, as I said above, it doesn't support them at all for now.
Sidenote: also during investigating this bug, I found another minor issue in CCommonBrowser class. According to https://www.geoffchappell.com/studies/windows/ie/browseui/classes/ccommonbrowser.htm it can be aggregated, but our current implememtation doesn't allow aggregate it, so in that log, I also see the following error:
which ideally shouldn't happen.
In order to fix this, we need just to change the appropriate macro in dll/win32/browseui/commonbrowser.h from DECLARE_NOT_AGGREGATABLE to DECLARE_AGGREGATABLE, according to https://docs.microsoft.com/en-us/cpp/atl/reference/aggregation-and-class-factory-macros?view=vs-2019.
I can confirm: after doing it, that error does no longer appear in the log, which is more correct. But it doesn't fix the actual bug.
I already stubplemented CUserAssist support in my local branch, and now, after my changes, I see another output as in the MS_shell32_after.log:
And the problem is still not fixed after my changes.
For some reason, it fails to load that interface anyway, and returns an error.
According to https://docs.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values, hres 0x80004002 means E_NOINTERFACE (No such interface supported), although the interface itself is already present.
According to https://www.geoffchappell.com/studies/windows/ie/browseui/interfaces/iuserassist.htm, all GUIDs whose are displayed in debug message are correct, but I have still no success. So either it requires the proper implementation itself, or something is wrong with my stub.
I'll open a PR for this for the further inverstigation. Allow me some time.