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
3fa12ba3
Commit
3fa12ba3
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 DIGCF_PRESENT.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f48e726e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
devinst.c
dlls/setupapi/devinst.c
+18
-14
No files found.
dlls/setupapi/devinst.c
View file @
3fa12ba3
...
...
@@ -1986,7 +1986,8 @@ end:
return
ret
;
}
static
void
SETUPDI_AddDeviceInterfaces
(
struct
device
*
device
,
HKEY
key
,
const
GUID
*
guid
)
static
void
SETUPDI_AddDeviceInterfaces
(
struct
device
*
device
,
HKEY
key
,
const
GUID
*
guid
,
DWORD
flags
)
{
DWORD
i
,
len
;
WCHAR
subKeyName
[
MAX_PATH
];
...
...
@@ -2004,19 +2005,23 @@ static void SETUPDI_AddDeviceInterfaces(struct device *device, HKEY key, const G
if
(
*
subKeyName
==
'#'
)
{
/* The subkey name is the reference string, with a '#' prepended */
iface
=
SETUPDI_CreateDeviceInterface
(
device
,
guid
,
subKeyName
+
1
);
l
=
RegOpenKeyExW
(
key
,
subKeyName
,
0
,
KEY_READ
,
&
subKey
);
if
(
!
l
)
{
WCHAR
symbolicLink
[
MAX_PATH
];
DWORD
dataType
;
len
=
sizeof
(
symbolicLink
);
l
=
RegQueryValueExW
(
subKey
,
SymbolicLink
,
NULL
,
&
dataType
,
(
BYTE
*
)
symbolicLink
,
&
len
);
if
(
!
l
&&
dataType
==
REG_SZ
)
SETUPDI_SetInterfaceSymbolicLink
(
iface
,
symbolicLink
);
RegCloseKey
(
subKey
);
if
(
!
(
flags
&
DIGCF_PRESENT
)
||
is_linked
(
subKey
))
{
iface
=
SETUPDI_CreateDeviceInterface
(
device
,
guid
,
subKeyName
+
1
);
len
=
sizeof
(
symbolicLink
);
l
=
RegQueryValueExW
(
subKey
,
SymbolicLink
,
NULL
,
&
dataType
,
(
BYTE
*
)
symbolicLink
,
&
len
);
if
(
!
l
&&
dataType
==
REG_SZ
)
SETUPDI_SetInterfaceSymbolicLink
(
iface
,
symbolicLink
);
RegCloseKey
(
subKey
);
}
}
}
/* Allow enumeration to continue */
...
...
@@ -2027,7 +2032,7 @@ static void SETUPDI_AddDeviceInterfaces(struct device *device, HKEY key, const G
}
static
void
SETUPDI_EnumerateMatchingInterfaces
(
HDEVINFO
DeviceInfoSet
,
HKEY
key
,
const
GUID
*
guid
,
LPCWSTR
enumstr
)
HKEY
key
,
const
GUID
*
guid
,
const
WCHAR
*
enumstr
,
DWORD
flags
)
{
struct
DeviceInfoSet
*
set
=
DeviceInfoSet
;
DWORD
i
,
len
;
...
...
@@ -2084,7 +2089,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
&
deviceClass
);
if
((
device
=
SETUPDI_CreateDeviceInfo
(
set
,
&
deviceClass
,
deviceInst
,
FALSE
)))
SETUPDI_AddDeviceInterfaces
(
device
,
subKey
,
guid
);
SETUPDI_AddDeviceInterfaces
(
device
,
subKey
,
guid
,
flags
);
}
RegCloseKey
(
deviceKey
);
}
...
...
@@ -2139,7 +2144,7 @@ static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet,
if
(
!
l
)
{
SETUPDI_EnumerateMatchingInterfaces
(
DeviceInfoSet
,
interfaceKey
,
&
interfaceGuid
,
enumstr
);
interfaceKey
,
&
interfaceGuid
,
enumstr
,
flags
);
RegCloseKey
(
interfaceKey
);
}
}
...
...
@@ -2152,7 +2157,7 @@ static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet,
* interface's key, so just pass that long
*/
SETUPDI_EnumerateMatchingInterfaces
(
DeviceInfoSet
,
interfacesKey
,
guid
,
enumstr
);
interfacesKey
,
guid
,
enumstr
,
flags
);
}
RegCloseKey
(
interfacesKey
);
}
...
...
@@ -2328,8 +2333,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsW(const GUID *class, LPCWSTR enumstr, HWND pa
HDEVINFO
WINAPI
SetupDiGetClassDevsExW
(
const
GUID
*
class
,
PCWSTR
enumstr
,
HWND
parent
,
DWORD
flags
,
HDEVINFO
deviceset
,
PCWSTR
machine
,
void
*
reserved
)
{
static
const
DWORD
unsupportedFlags
=
DIGCF_DEFAULT
|
DIGCF_PRESENT
|
DIGCF_PROFILE
;
static
const
DWORD
unsupportedFlags
=
DIGCF_DEFAULT
|
DIGCF_PROFILE
;
HDEVINFO
set
;
TRACE
(
"%s %s %p 0x%08x %p %s %p
\n
"
,
debugstr_guid
(
class
),
...
...
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