diff --git a/dlls/qcap/dllsetup.c b/dlls/qcap/dllsetup.c index 8218b25fa7a..d64b9dbbd25 100644 --- a/dlls/qcap/dllsetup.c +++ b/dlls/qcap/dllsetup.c @@ -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 ); diff --git a/dlls/qcap/dllsetup.h b/dlls/qcap/dllsetup.h index 4b18769aeb4..c1bcf98478e 100644 --- a/dlls/qcap/dllsetup.h +++ b/dlls/qcap/dllsetup.h @@ -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 diff --git a/dlls/qcap/qcap_main.c b/dlls/qcap/qcap_main.c index 6cf9b0cbed1..6e3cca2ea03 100644 --- a/dlls/qcap/qcap_main.c +++ b/dlls/qcap/qcap_main.c @@ -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); } /***********************************************************************