advapi32: Make rpcrt4 a delayed import to work around circular dependencies with native.
This commit is contained in:
parent
5b3750e2a4
commit
58a698882d
|
@ -5,7 +5,8 @@ SRCDIR = @srcdir@
|
|||
VPATH = @srcdir@
|
||||
MODULE = advapi32.dll
|
||||
IMPORTLIB = advapi32
|
||||
IMPORTS = rpcrt4 kernel32 ntdll
|
||||
IMPORTS = kernel32 ntdll
|
||||
DELAYIMPORTS = rpcrt4
|
||||
EXTRALIBS = @SECURITYLIB@
|
||||
|
||||
C_SRCS = \
|
||||
|
|
|
@ -284,13 +284,6 @@ static void CRYPT_CreateMachineGuid(void)
|
|||
r = RegQueryValueExW(key, machineGuidW, NULL, NULL, NULL, &size);
|
||||
if (r == ERROR_FILE_NOT_FOUND)
|
||||
{
|
||||
static const WCHAR rpcrt4[] = {
|
||||
'r','p','c','r','t','4',0 };
|
||||
HMODULE lib = LoadLibraryW(rpcrt4);
|
||||
|
||||
if (lib)
|
||||
{
|
||||
RPC_STATUS (RPC_ENTRY *pUuidCreate)(UUID *);
|
||||
UUID uuid;
|
||||
WCHAR buf[37];
|
||||
RPC_STATUS rs;
|
||||
|
@ -302,8 +295,7 @@ static void CRYPT_CreateMachineGuid(void)
|
|||
'%','0','2','x','%','0','2','x',
|
||||
'%','0','2','x',0 };
|
||||
|
||||
pUuidCreate = (void *)GetProcAddress(lib, "UuidCreate");
|
||||
rs = pUuidCreate(&uuid);
|
||||
rs = UuidCreate(&uuid);
|
||||
if (rs == S_OK)
|
||||
{
|
||||
sprintfW(buf, uuidFmt,
|
||||
|
@ -316,8 +308,6 @@ static void CRYPT_CreateMachineGuid(void)
|
|||
(const BYTE *)buf,
|
||||
(lstrlenW(buf)+1)*sizeof(WCHAR));
|
||||
}
|
||||
FreeLibrary(lib);
|
||||
}
|
||||
}
|
||||
RegCloseKey(key);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue