mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
qmgr: Dynamically link to advpack.dll.
Use RegInstall instead of RegInstallA as RegInstallA isn't available in some native versions of advpack commonly installed by programs.
This commit is contained in:
parent
bab7871cac
commit
b2603687cc
2 changed files with 8 additions and 2 deletions
|
@ -3,7 +3,7 @@ TOPOBJDIR = ../..
|
|||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = qmgr.dll
|
||||
IMPORTS = advpack wininet urlmon ole32 advapi32 kernel32
|
||||
IMPORTS = wininet urlmon ole32 advapi32 kernel32
|
||||
EXTRALIBS = -luuid
|
||||
|
||||
C_SRCS = \
|
||||
|
|
|
@ -141,6 +141,9 @@ static HRESULT register_server(BOOL do_register)
|
|||
{
|
||||
HRESULT hr;
|
||||
STRTABLEA strtable;
|
||||
HMODULE hAdvpack;
|
||||
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
|
||||
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
|
||||
|
||||
TRACE("(%x)\n", do_register);
|
||||
|
||||
|
@ -150,9 +153,12 @@ static HRESULT register_server(BOOL do_register)
|
|||
return hr;
|
||||
}
|
||||
|
||||
hAdvpack = LoadLibraryW(wszAdvpack);
|
||||
pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
|
||||
|
||||
hr = init_register_strtable(&strtable);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = RegInstallA(hInst, do_register ? "RegisterDll" : "UnregisterDll",
|
||||
hr = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll",
|
||||
&strtable);
|
||||
cleanup_register_strtable(&strtable);
|
||||
|
||||
|
|
Loading…
Reference in a new issue