Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e1449796
Commit
e1449796
authored
Sep 20, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Make a helper to convert a GUID to a string.
parent
60fefd72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
devinst.c
dlls/setupapi/devinst.c
+13
-11
No files found.
dlls/setupapi/devinst.c
View file @
e1449796
...
...
@@ -147,6 +147,18 @@ static void SETUPDI_FreeDeviceInfo(struct DeviceInfo *devInfo)
HeapFree
(
GetProcessHeap
(),
0
,
devInfo
);
}
static
void
SETUPDI_GuidToString
(
const
GUID
*
guid
,
LPWSTR
guidStr
)
{
static
const
WCHAR
fmt
[]
=
{
'{'
,
'%'
,
'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
};
sprintfW
(
guidStr
,
fmt
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
}
/* Adds a device with GUID guid and identifer devInst to set. Allocates a
* struct DeviceInfo, and points the returned device info's Reserved member
* to it.
...
...
@@ -1984,7 +1996,6 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW(
PCWSTR
MachineName
,
PVOID
Reserved
)
{
LPWSTR
lpGuidString
;
WCHAR
bracedGuidString
[
39
];
HKEY
hClassesKey
;
HKEY
hClassKey
;
...
...
@@ -2023,16 +2034,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW(
if
(
ClassGuid
==
NULL
)
return
hClassesKey
;
if
(
UuidToStringW
((
UUID
*
)
ClassGuid
,
&
lpGuidString
)
!=
RPC_S_OK
)
{
RegCloseKey
(
hClassesKey
);
return
INVALID_HANDLE_VALUE
;
}
bracedGuidString
[
0
]
=
'{'
;
memcpy
(
&
bracedGuidString
[
1
],
lpGuidString
,
36
*
sizeof
(
WCHAR
));
bracedGuidString
[
37
]
=
'}'
;
bracedGuidString
[
38
]
=
0
;
RpcStringFreeW
(
&
lpGuidString
);
SETUPDI_GuidToString
(
ClassGuid
,
bracedGuidString
);
if
(
RegOpenKeyExW
(
hClassesKey
,
bracedGuidString
,
...
...
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