On 29/05/2020 19:53, Jacek Caban wrote:
On 26.05.2020 14:41, Gabriel Ivăncescu wrote:
diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index 6d098cd..7a18a84 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -106,6 +106,9 @@ struct ScriptControl { IAdviseSink *view_sink; DWORD view_sink_flags; + /* modules */ + IScriptModuleCollection IScriptModuleCollection_iface;
ScriptHost *host; };
It looks like it could be a separated object (which could potentially help with your references problem).
Jacek
It makes no difference if it's a separate object in this case. The module collection is tied to the control: updating the control (via put_Language for example) will also update an existing module collection, not just newly obtained ones, as tests show.
Modules are a different thing, though: they get detached and operations are not valid anymore (but obviously still in memory so using them doesn't cause a use-after-free), hence the issue.
I will explain more in the reply to the other message.