Wine fails, missing *.dll

I have installed wine with sudo dnf install wine.

% wine --version
wine-7.22 (Staging)

[I don’t remember exactly which command I run there.]

007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0024:err:module:import_dll Library win32u.dll (which is needed by L"C:\\windows\\syswow64\\user32.dll") not found
0024:err:module:import_dll Library user32.dll (which is needed by L"C:\\windows\\syswow64\\gdi32.dll") not found
0024:err:module:import_dll Library win32u.dll (which is needed by L"C:\\windows\\syswow64\\gdi32.dll") not found
0024:err:module:import_dll Library gdi32.dll (which is needed by L"C:\\windows\\syswow64\\comctl32.dll") not found
% uname -a
Linux mac2011-fedora 6.0.18-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 7 17:10:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

How to install and simply test wine on Fedora 37?

Remove ~/.wine (if it exists). In terminal, run winecfg, this should open a window. Do nothing in it but leave it open.

Open another terminal. Therein run wine clock and wine notepad or wine whatever, it should work.

Where was wine installed from?

I have wine installed from fedora with (I think) dnf install wine*. At least I seem to have every wine package provided from fedora installed. The fedora version is 7.22.

I do not get those errors with the same command so it seems that you may be missing some of the required packages.

$ wine --version
wine-7.22 (Staging)

Sorry our messages crossed. Apparently it works as I wrote, if and only if winecfg is open. If winecfg has been closed:

% wine clock                                 
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.22 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:wineusb:add_usb_device Interface 2 has 3 alternate settings; using the first one.
0084:fixme:wineusb:add_usb_device Interface 2 has 3 alternate settings; using the first one.
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
0080:fixme:wineusb:query_id Unhandled ID query type 0x5.
00e4:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00e4:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."

and the only way I found to recover is remove ‘~/.wine’.

The wine versions on WineHQ are 7.0 stable and 8.0.rc3.
7.22 is a staging version that is not considered 100% stable.

With winecfg you can set the windows version to emulate with a lot of other configs so that by itself may be part of the fix you are looking for.