June 29, 2026
5:23 p.m.
+ UNICODE_STRING *image_path_name = &Process->info.PebBaseAddress->ProcessParameters->ImagePathName;
That's not going to work. It probably would in the real Windows kernel, but we don't have access to the process's address space. I note that you may have copied from PsGetCurrentProcessSessionId(), which is also broken. You'll need to emulate PsGetProcessSectionBaseAddress() instead. This should also have a test, in dlls/ntoskrnl.exe/tests/driver.c. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11283#note_144450