mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +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
@ -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 New Issue
Block a user