On Wed Oct 26 09:43:41 2022 +0000, Alexandre Julliard wrote:
So I presume, I need to modify my patch a little, to only print the error when `if (current_modref)` holds *(i.e. to remove the `else` branch)*. The `current_modref` being set implies we're trying to load the lib because it's required by something else.
That won't help, it's legitimate to try to load a dll to see if it can be loaded, just like opening a non-existent file. It's also expected for it to fail if some dependency is missing, that's not necessarily a problem. Printing an error at that point is going to cause a lot of false positives.
Hmm, thanks, I see. Welp, in this case the only possible fix is to add to `load_dll()` a new `BOOL *err_for_parent_dll` argument to specifically indicate, whether the error is for the parent or the child one.
I've spent lots of time attempting various refactorings in this code, and if we can't move the error from `import_dll` down to `load_dll`, adding a new argument is the only way to fix this AFAICS.