Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/main.c | 3 +++ dlls/strmbase/dispatch.c | 13 +++++++++++++ include/wine/strmbase.h | 1 + 3 files changed, 17 insertions(+)
diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 4acb4f1a79..9266987c2e 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -32,7 +32,10 @@ LONG object_locks = 0; BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) { if (reason == DLL_PROCESS_DETACH) + { video_window_unregister_class(); + strmbase_release_typelibs(); + } return QUARTZ_DllMain(instance, reason, reserved); }
diff --git a/dlls/strmbase/dispatch.c b/dlls/strmbase/dispatch.c index 25573fa1a2..5d3d9aad99 100644 --- a/dlls/strmbase/dispatch.c +++ b/dlls/strmbase/dispatch.c @@ -68,3 +68,16 @@ HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **ret) ITypeInfo_AddRef(*ret = control_typeinfo[tid]); return S_OK; } + +void strmbase_release_typelibs(void) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(control_typeinfo); ++i) + { + if (control_typeinfo[i]) + ITypeInfo_Release(control_typeinfo); + } + if (control_typelib) + ITypeLib_Release(control_typelib); +} diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 6789957e50..02a5469de1 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -252,6 +252,7 @@ enum strmbase_type_id };
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo); +void strmbase_release_typelibs(void);
struct strmbase_passthrough {