On Thu Feb 6 14:48:30 2025 +0000, Jacek Caban wrote:
So, in a sense, `add_module_dependency` holds the final authority over
whether we want to actually increase LoadCount or not. I see, thanks for explanation. It would be easier to follow if `add_module_dependency` would be responsible for increasing `LoadCount` instead, but it would mean that we'd initially create a module with 0 `LoadCount`, creating more corner cases, so in the end something like would likely not be worth it. `LdrUnloadDll` is rather a heavy tool just to decrease the count in that patch. Since we know that we have another edge, we know that we won't actually need to unload the DLL, so just a direct decrement of `LoadCount` should be enough? I'm mentioning that for consideration, it's not a strong opinion.
Done in v9.