Commit 80296792 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

qcap: Do not store full DLL path in the registry.

parent e82d2285
......@@ -271,17 +271,13 @@ static HRESULT SetupRegisterAllClasses(const CFactoryTemplate * pList, int num,
*
****************************************************************************/
HRESULT SetupRegisterServers(const CFactoryTemplate * pList, int num,
HINSTANCE hinst, BOOL bRegister)
BOOL bRegister)
{
static const WCHAR szFileName[] = {'q','c','a','p','.','d','l','l',0};
HRESULT hr = NOERROR;
WCHAR szFileName[MAX_PATH];
IFilterMapper2 *pIFM2 = NULL;
IFilterMapper *pIFM = NULL;
/* Win95 wouldn't support the Unicode version of this API!! */
if (!GetModuleFileNameW(hinst, szFileName, MAX_PATH))
return HRESULT_FROM_WIN32(GetLastError());
/* first register all server classes, just to make sure */
if (bRegister)
hr = SetupRegisterAllClasses(pList, num, szFileName, TRUE );
......
......@@ -66,8 +66,7 @@ typedef struct tagCFactoryTemplate {
* CFactoryTemplate
*
****************************************************************************/
extern HRESULT SetupRegisterServers(const CFactoryTemplate * pList, int num,
HINSTANCE hinst, BOOL bRegister);
extern HRESULT SetupRegisterServers(const CFactoryTemplate * pList, int num, BOOL bRegister);
/****************************************************************************
* SetupInitializeServers
......
......@@ -45,7 +45,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
static LONG objects_ref = 0;
static LONG server_locks = 0;
static HINSTANCE ghInst = NULL;
static const WCHAR wAudioCaptFilter[] =
{'A','u','d','i','o',' ','C','a','p','t','u','r','e',' ','F','i','l','t','e','r',0};
......@@ -158,7 +157,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
ghInst = hInstDLL;
SetupInitializeServers(g_cTemplates, g_numTemplates, TRUE);
break;
case DLL_PROCESS_DETACH:
......@@ -175,7 +173,7 @@ HRESULT WINAPI DllRegisterServer(void)
{
TRACE("()\n");
return SetupRegisterServers(g_cTemplates, g_numTemplates, ghInst, TRUE);
return SetupRegisterServers(g_cTemplates, g_numTemplates, TRUE);
}
/***********************************************************************
......@@ -185,7 +183,7 @@ HRESULT WINAPI DllUnregisterServer(void)
{
TRACE("\n");
return SetupRegisterServers(g_cTemplates, g_numTemplates, ghInst, FALSE);
return SetupRegisterServers(g_cTemplates, g_numTemplates, FALSE);
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment