Check that NULL has no special meaning.
Check GetLastError() for systray windows.
Trace the module filename in case of unexpected success and enclose it
in quotes in case there are leading or trailing spaces.
Fix the filename buffer initialization.
---
The buf2[0] = 0 line at the top of the patch was introduced in
914cb228685b but buf2 was not used after that. So clearly it is buf1
that should have been initialized there.
That said I'm not sure initializing buf1 & buf2 is really necessary as
they are only used in case of success. I guess the fear was that
GetWindowModuleFileName() would sometimes return success without
touching the buffer but I'm not convinced that fear is justified. Still
I decided to be conservative and preserve the initializations. I'm fine
with removing them though (maybe the buf2 case is a bit special).
Finally this is meant to help figure out the reason for the failure
decribed in bug 55777.
--
v2: user32/tests: Don't test GetWindowModuleFileName() on windows belonging to another process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4084