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
3ff98740
Commit
3ff98740
authored
Nov 30, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupDiRemoveDeviceInterface().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0cc68cf8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
devinst.c
dlls/setupapi/devinst.c
+24
-4
devinst.c
dlls/setupapi/tests/devinst.c
+0
-2
No files found.
dlls/setupapi/devinst.c
View file @
3ff98740
...
...
@@ -556,6 +556,19 @@ static BOOL SETUPDI_SetDeviceRegistryPropertyW(struct device *device,
return
FALSE
;
}
static
void
remove_device_iface
(
struct
device_iface
*
iface
)
{
RegDeleteTreeW
(
iface
->
refstr_key
,
NULL
);
RegDeleteKeyW
(
iface
->
refstr_key
,
emptyW
);
RegCloseKey
(
iface
->
refstr_key
);
iface
->
refstr_key
=
NULL
;
/* Also remove the class key if it's empty. */
RegDeleteKeyW
(
iface
->
class_key
,
emptyW
);
RegCloseKey
(
iface
->
class_key
);
iface
->
class_key
=
NULL
;
iface
->
flags
|=
SPINT_REMOVED
;
}
static
void
SETUPDI_RemoveDevice
(
struct
device
*
device
)
{
struct
device_iface
*
iface
,
*
next
;
...
...
@@ -1537,11 +1550,18 @@ BOOL WINAPI SetupDiRemoveDevice(
/***********************************************************************
* SetupDiRemoveDeviceInterface (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiRemoveDeviceInterface
(
HDEVINFO
info
,
PSP_DEVICE_INTERFACE_DATA
data
)
BOOL
WINAPI
SetupDiRemoveDeviceInterface
(
HDEVINFO
devinfo
,
SP_DEVICE_INTERFACE_DATA
*
iface_
data
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
info
,
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
struct
device_iface
*
iface
;
TRACE
(
"devinfo %p, iface_data %p.
\n
"
,
devinfo
,
iface_data
);
if
(
!
(
iface
=
get_device_iface
(
devinfo
,
iface_data
)))
return
FALSE
;
remove_device_iface
(
iface
);
return
TRUE
;
}
/***********************************************************************
...
...
dlls/setupapi/tests/devinst.c
View file @
3ff98740
...
...
@@ -552,7 +552,6 @@ static void check_device_iface_(int line, HDEVINFO set, SP_DEVINFO_DATA *device,
ok_
(
__FILE__
,
line
)(
ret
,
"Failed to enumerate interfaces, error %#x.
\n
"
,
GetLastError
());
ok_
(
__FILE__
,
line
)(
IsEqualGUID
(
&
iface
.
InterfaceClassGuid
,
class
),
"Got unexpected class %s.
\n
"
,
wine_dbgstr_guid
(
&
iface
.
InterfaceClassGuid
));
todo_wine_if
(
flags
&
SPINT_REMOVED
)
ok_
(
__FILE__
,
line
)(
iface
.
Flags
==
flags
,
"Got unexpected flags %#x.
\n
"
,
iface
.
Flags
);
ret
=
SetupDiGetDeviceInterfaceDetailA
(
set
,
&
iface
,
detail
,
sizeof
(
buffer
),
NULL
,
NULL
);
ok_
(
__FILE__
,
line
)(
ret
,
"Failed to get interface detail, error %#x.
\n
"
,
GetLastError
());
...
...
@@ -656,7 +655,6 @@ static void test_device_iface(void)
ret
=
SetupDiEnumDeviceInterfaces
(
set
,
&
device
,
&
guid2
,
0
,
&
iface
);
ok
(
ret
,
"Failed to enumerate interfaces, error %#x.
\n
"
,
GetLastError
());
ret
=
SetupDiRemoveDeviceInterface
(
set
,
&
iface
);
todo_wine
ok
(
ret
,
"Failed to remove interface, error %#x.
\n
"
,
GetLastError
());
check_device_iface
(
set
,
&
device
,
&
guid2
,
0
,
SPINT_REMOVED
,
"
\\\\
?
\\
ROOT#LEGACY_BOGUS#0000#{6A55B5A5-3F65-11DB-B704-0011955C2BDB}"
);
...
...
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