qedit: Free type libraries on process detach (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4beda16757
commit
0e6fc4d81c
|
@ -23,15 +23,18 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
|
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
|
||||||
|
|
||||||
static HINSTANCE instance;
|
static HINSTANCE qedit_instance;
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||||
{
|
{
|
||||||
switch(fdwReason) {
|
if (reason == DLL_PROCESS_ATTACH)
|
||||||
case DLL_PROCESS_ATTACH:
|
{
|
||||||
instance = hInstDLL;
|
qedit_instance = instance;
|
||||||
DisableThreadLibraryCalls(hInstDLL);
|
DisableThreadLibraryCalls(instance);
|
||||||
break;
|
}
|
||||||
|
else if (reason == DLL_PROCESS_DETACH && !reserved)
|
||||||
|
{
|
||||||
|
strmbase_release_typelibs();
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -243,7 +246,7 @@ HRESULT WINAPI DllRegisterServer(void)
|
||||||
IFilterMapper2 *mapper;
|
IFilterMapper2 *mapper;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
if (FAILED(hr = __wine_register_resources( instance )))
|
if (FAILED(hr = __wine_register_resources(qedit_instance)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
|
if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
|
||||||
|
@ -267,7 +270,7 @@ HRESULT WINAPI DllUnregisterServer(void)
|
||||||
IFilterMapper2 *mapper;
|
IFilterMapper2 *mapper;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
if (FAILED(hr = __wine_unregister_resources( instance )))
|
if (FAILED(hr = __wine_unregister_resources(qedit_instance)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
|
if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
|
|
||||||
#include "qedit_private.h"
|
#include "qedit_private.h"
|
||||||
#include "wine/strmbase.h"
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
|
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "dshow.h"
|
#include "dshow.h"
|
||||||
#include "qedit.h"
|
#include "qedit.h"
|
||||||
|
#include "wine/strmbase.h"
|
||||||
|
|
||||||
HRESULT timeline_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
HRESULT timeline_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||||
HRESULT media_detector_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
HRESULT media_detector_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
|
|
||||||
#include "qedit_private.h"
|
#include "qedit_private.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/strmbase.h"
|
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
|
WINE_DEFAULT_DEBUG_CHANNEL(qedit);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue