9 Sep
2024
9 Sep
'24
3:50 p.m.
Alfred Agrell (@Alcaro) commented about dlls/kernel32/process.c:
+ RtlInitUnicodeString(&uguid, wguid); + + if (!set_ntstatus(RtlGUIDFromString(&uguid, &vendor))) + return 0; + + nsize = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0); + + if (!(wname = HeapAlloc(GetProcessHeap(), 0, nsize * sizeof(wname)))) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + + MultiByteToWideChar(CP_ACP, 0, name, -1, wname, nsize); + + RtlInitUnicodeString(&uname, wname); This could be slightly simplified by calling GetFirmwareEnvironmentVariableExW here instead of NtQuerySystemEnvironmentValueEx.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6423#note_81631