Re: [3/4]strmbase: implement OLE registration in AMovieDllRegisterServer2
Aric Stewart <aric(a)codeweavers.com> writes:
HRESULT WINAPI AMovieDllRegisterServer2(BOOL bRegister) { HRESULT hr; int i; IFilterMapper2 *pIFM2 = NULL; + HMODULE psapi; + fnGetModuleFileNameExW pFunc; + WCHAR szFileName[MAX_PATH]; + + psapi = LoadLibraryA("psapi.dll"); + if (psapi) + { + pFunc = (fnGetModuleFileNameExW)GetProcAddress(psapi, "GetModuleFileNameExW"); + if (pFunc) + { + if (!pFunc(GetCurrentProcess(), g_hInst, szFileName, MAX_PATH)) + { + ERR("Failed to get module file name for registration\n"); + return E_FAIL; + } + } + else + { + ERR("Failed to get get function GetModuleFileNameExW\n"); + return E_FAIL; + } + } + else + { + ERR("Failed to load psapi.dll\n"); + return E_FAIL; + } + FreeLibrary(psapi);
There's no reason to use psapi for this. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard