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
f4b9bc24
Commit
f4b9bc24
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: Implement SetupDiRegisterDeviceInfo.
parent
a57a17d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
devinst.c
dlls/setupapi/devinst.c
+26
-2
devinst.c
dlls/setupapi/tests/devinst.c
+0
-5
No files found.
dlls/setupapi/devinst.c
View file @
f4b9bc24
...
...
@@ -1060,11 +1060,35 @@ BOOL WINAPI SetupDiRegisterDeviceInfo(
PVOID
CompareContext
,
PSP_DEVINFO_DATA
DupDeviceInfoData
)
{
struct
DeviceInfoSet
*
set
=
(
struct
DeviceInfoSet
*
)
DeviceInfoSet
;
struct
DeviceInfo
*
devInfo
;
TRACE
(
"%p %p %08x %p %p %p
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
Flags
,
CompareProc
,
CompareContext
,
DupDeviceInfoData
);
FIXME
(
"
\n
"
);
return
FALSE
;
if
(
!
DeviceInfoSet
||
DeviceInfoSet
==
(
HDEVINFO
)
INVALID_HANDLE_VALUE
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
set
->
magic
!=
SETUP_DEVICE_INFO_SET_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
!
DeviceInfoData
||
DeviceInfoData
->
cbSize
!=
sizeof
(
SP_DEVINFO_DATA
)
||
!
DeviceInfoData
->
Reserved
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
(
devInfo
->
phantom
)
{
devInfo
->
phantom
=
FALSE
;
RegDeleteValueW
(
devInfo
->
key
,
Phantom
);
}
return
TRUE
;
}
/***********************************************************************
...
...
dlls/setupapi/tests/devinst.c
View file @
f4b9bc24
...
...
@@ -289,7 +289,6 @@ static void testRegisterDeviceInfo(void)
}
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
NULL
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ret
=
pSetupDiRegisterDeviceInfo
(
NULL
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
...
...
@@ -301,18 +300,15 @@ static void testRegisterDeviceInfo(void)
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
&
devInfo
,
0
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
devInfo
.
cbSize
=
sizeof
(
devInfo
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
&
devInfo
,
0
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ret
=
pSetupDiCreateDeviceInfoA
(
set
,
"USB
\\
BOGUS
\\
0000"
,
&
guid
,
...
...
@@ -324,7 +320,6 @@ static void testRegisterDeviceInfo(void)
/* If it already existed, registering it again will fail */
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
&
devInfo
,
0
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
ret
,
"SetupDiCreateDeviceInfoA failed: %d
\n
"
,
GetLastError
());
}
/* FIXME: On Win2K+ systems, this is now persisted to registry in
...
...
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