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
9fca0f27
Commit
9fca0f27
authored
Apr 28, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Apr 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Replace UuidToStringW call with a sprintfW.
parent
d38cd2a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
crypt.c
dlls/advapi32/crypt.c
+22
-11
No files found.
dlls/advapi32/crypt.c
View file @
9fca0f27
...
...
@@ -294,20 +294,31 @@ static void CRYPT_CreateMachineGuid(void)
if
(
lib
)
{
RPC_STATUS
(
RPC_ENTRY
*
pUuidCreate
)(
UUID
*
);
RPC_STATUS
(
RPC_ENTRY
*
pUuidToString
)(
UUID
*
,
WCHAR
**
);
RPC_STATUS
(
RPC_ENTRY
*
pRpcStringFree
)(
WCHAR
**
);
UUID
uuid
;
WCHAR
*
uuidStr
;
WCHAR
buf
[
37
];
RPC_STATUS
rs
;
static
const
WCHAR
uuidFmt
[]
=
{
'%'
,
'0'
,
'8'
,
'x'
,
'-'
,
'%'
,
'0'
,
'4'
,
'x'
,
'-'
,
'%'
,
'0'
,
'4'
,
'x'
,
'-'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'-'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
0
};
pUuidCreate
=
GetProcAddress
(
lib
,
"UuidCreate"
);
pUuidToString
=
GetProcAddress
(
lib
,
"UuidToStringW"
);
pRpcStringFree
=
GetProcAddress
(
lib
,
"RpcStringFreeW"
);
pUuidCreate
(
&
uuid
);
pUuidToString
(
&
uuid
,
&
uuidStr
);
RegSetValueExW
(
key
,
machineGuidW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
uuidStr
,
(
lstrlenW
(
uuidStr
)
+
1
)
*
sizeof
(
WCHAR
));
pRpcStringFree
(
&
uuidStr
);
rs
=
pUuidCreate
(
&
uuid
);
if
(
rs
==
S_OK
)
{
sprintfW
(
buf
,
uuidFmt
,
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
);
}
}
...
...
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