25 Oct
2024
25 Oct
'24
9:38 p.m.
Hans Leidekker (@hans) commented about dlls/wbemprox/builtin.c:
return NULL; /* FIXME handle different process case */ }
+static WCHAR *get_executablepath( DWORD process_id ) +{ + DWORD size = MAX_PATH; + HANDLE process = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, process_id ); + WCHAR *executable_path = calloc(sizeof(WCHAR), size + 1); + if (!process) + { + ERR( "Failed to open process %lu: %lu\n", process_id, GetLastError() ); + return wcsdup( L"" );
I don't think this is worth an error message, the process may legitimately disappear before this is called. And returning NULL is fine in that case. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6734#note_86138