Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
58a69888
Commit
58a69888
authored
Jun 21, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Make rpcrt4 a delayed import to work around circular dependencies with native.
parent
5b3750e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
35 deletions
+26
-35
Makefile.in
dlls/advapi32/Makefile.in
+2
-1
crypt.c
dlls/advapi32/crypt.c
+24
-34
No files found.
dlls/advapi32/Makefile.in
View file @
58a69888
...
@@ -5,7 +5,8 @@ SRCDIR = @srcdir@
...
@@ -5,7 +5,8 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
advapi32.dll
MODULE
=
advapi32.dll
IMPORTLIB
=
advapi32
IMPORTLIB
=
advapi32
IMPORTS
=
rpcrt4 kernel32 ntdll
IMPORTS
=
kernel32 ntdll
DELAYIMPORTS
=
rpcrt4
EXTRALIBS
=
@SECURITYLIB@
EXTRALIBS
=
@SECURITYLIB@
C_SRCS
=
\
C_SRCS
=
\
...
...
dlls/advapi32/crypt.c
View file @
58a69888
...
@@ -284,40 +284,30 @@ static void CRYPT_CreateMachineGuid(void)
...
@@ -284,40 +284,30 @@ static void CRYPT_CreateMachineGuid(void)
r
=
RegQueryValueExW
(
key
,
machineGuidW
,
NULL
,
NULL
,
NULL
,
&
size
);
r
=
RegQueryValueExW
(
key
,
machineGuidW
,
NULL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,
'x'
,
0
};
uuid
.
Data4
[
0
],
uuid
.
Data4
[
1
],
uuid
.
Data4
[
2
],
uuid
.
Data4
[
3
],
pUuidCreate
=
(
void
*
)
GetProcAddress
(
lib
,
"UuidCreate"
);
uuid
.
Data4
[
4
],
uuid
.
Data4
[
5
],
rs
=
pUuidCreate
(
&
uuid
);
uuid
.
Data4
[
6
],
uuid
.
Data4
[
7
]
);
if
(
rs
==
S_OK
)
RegSetValueExW
(
key
,
machineGuidW
,
0
,
REG_SZ
,
{
(
const
BYTE
*
)
buf
,
sprintfW
(
buf
,
uuidFmt
,
(
lstrlenW
(
buf
)
+
1
)
*
sizeof
(
WCHAR
));
uuid
.
Data1
,
uuid
.
Data2
,
uuid
.
Data3
,
}
uuid
.
Data4
[
0
],
uuid
.
Data4
[
1
],
uuid
.
Data4
[
2
],
uuid
.
Data4
[
3
],
uuid
.
Data4
[
4
],
uuid
.
Data4
[
5
],
uuid
.
Data4
[
6
],
uuid
.
Data4
[
7
]
);
RegSetValueExW
(
key
,
machineGuidW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
buf
,
(
lstrlenW
(
buf
)
+
1
)
*
sizeof
(
WCHAR
));
}
FreeLibrary
(
lib
);
}
}
}
RegCloseKey
(
key
);
RegCloseKey
(
key
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment