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
f48e726e
Commit
f48e726e
authored
Aug 16, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SPINT_LINKED.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad6845b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
devinst.c
dlls/setupapi/devinst.c
+26
-1
No files found.
dlls/setupapi/devinst.c
View file @
f48e726e
...
...
@@ -91,6 +91,8 @@ static const WCHAR UpperFilters[] = {'U','p','p','e','r','F','i','l','t','e','r'
static
const
WCHAR
LowerFilters
[]
=
{
'L'
,
'o'
,
'w'
,
'e'
,
'r'
,
'F'
,
'i'
,
'l'
,
't'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
Phantom
[]
=
{
'P'
,
'h'
,
'a'
,
'n'
,
't'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
SymbolicLink
[]
=
{
'S'
,
'y'
,
'm'
,
'b'
,
'o'
,
'l'
,
'i'
,
'c'
,
'L'
,
'i'
,
'n'
,
'k'
,
0
};
static
const
WCHAR
Control
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
0
};
static
const
WCHAR
Linked
[]
=
{
'L'
,
'i'
,
'n'
,
'k'
,
'e'
,
'd'
,
0
};
/* is used to identify if a DeviceInfoSet pointer is
valid or not */
...
...
@@ -299,6 +301,25 @@ static LPWSTR SETUPDI_CreateSymbolicLinkPath(LPCWSTR instanceId,
return
ret
;
}
static
BOOL
is_linked
(
HKEY
key
)
{
DWORD
linked
,
type
,
size
;
HKEY
control_key
;
BOOL
ret
=
FALSE
;
if
(
!
RegOpenKeyW
(
key
,
Control
,
&
control_key
))
{
size
=
sizeof
(
DWORD
);
if
(
!
RegQueryValueExW
(
control_key
,
Linked
,
NULL
,
&
type
,
(
BYTE
*
)
&
linked
,
&
size
)
&&
type
==
REG_DWORD
&&
linked
)
ret
=
TRUE
;
RegCloseKey
(
control_key
);
}
return
ret
;
}
static
struct
device_iface
*
SETUPDI_CreateDeviceInterface
(
struct
device
*
device
,
const
GUID
*
class
,
const
WCHAR
*
refstr
)
{
...
...
@@ -334,7 +355,7 @@ static struct device_iface *SETUPDI_CreateDeviceInterface(struct device *device,
iface
->
symlink
=
symlink
;
iface
->
device
=
device
;
iface
->
class
=
*
class
;
iface
->
flags
=
SPINT_ACTIVE
;
/* FIXME */
iface
->
flags
=
0
;
if
(
!
(
path
=
get_iface_key_path
(
iface
)))
{
...
...
@@ -365,6 +386,10 @@ static struct device_iface *SETUPDI_CreateDeviceInterface(struct device *device,
}
RegSetValueExW
(
key
,
SymbolicLink
,
0
,
REG_SZ
,
(
BYTE
*
)
iface
->
symlink
,
lstrlenW
(
iface
->
symlink
)
*
sizeof
(
WCHAR
));
if
(
is_linked
(
key
))
iface
->
flags
|=
SPINT_ACTIVE
;
RegCloseKey
(
key
);
heap_free
(
path
);
...
...
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