Hongbo Ni wrote:
Back to DLL injecting, It works since Windows 95. My program has been working for many years, but not on Wine.
Here is how to inject a DLL into another process: .....
Ok I think I understand. You are using a technique I have once read about in Microsoft System Journal back in about 1994. And this is certainly tricky.
Eventhough I'm anything but an expert in these matters I do think that the code that receives a message for a process and checks if a WH_GETMESSAGE hook is set and in that case maps the according DLL into the process space if that hasn't already happened, should also track down all implicit dependencies of that DLL and map them into the process space too.
It may currently just do a LoadLibrary equivalent and that will of course not find the B.dll as it is not in any of the standard search locations for the injected process.
I do not think that the solution is to "correct" LoadLibrary to actually do a search for linked libraries in the parent library's directory too.
However I fear the proper fix might go deep into Wine server and probably is above most people's head except for Alexandre. What you can do is trying to get an actual test integrated to the Wine tests that does what you do in your test that you wrote and mark that test as todo_wine. And then hope that Alexandre can find a way to implement a fix without to much trouble.
Of course if you can find the way to implement that correctly a second patch after the test has been added as todo_wine would certainly be welcome.
Rolf Kalbermatter