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
66820122
Commit
66820122
authored
Sep 21, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Add error checking to SetupDiCreateDeviceInterfaceW stub.
parent
aa2b23ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
devinst.c
dlls/setupapi/devinst.c
+26
-0
devinst.c
dlls/setupapi/tests/devinst.c
+0
-5
No files found.
dlls/setupapi/devinst.c
View file @
66820122
...
...
@@ -1800,10 +1800,36 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceW(
DWORD
CreationFlags
,
PSP_DEVICE_INTERFACE_DATA
DeviceInterfaceData
)
{
struct
DeviceInfoSet
*
set
=
(
struct
DeviceInfoSet
*
)
DeviceInfoSet
;
struct
DeviceInfo
*
devInfo
;
TRACE
(
"%p %p %s %s %08x %p
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
debugstr_guid
(
InterfaceClassGuid
),
debugstr_w
(
ReferenceString
),
CreationFlags
,
DeviceInterfaceData
);
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
;
}
if
(
!
InterfaceClassGuid
)
{
SetLastError
(
ERROR_INVALID_USER_BUFFER
);
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
FIXME
(
"stub
\n
"
);
return
FALSE
;
}
...
...
dlls/setupapi/tests/devinst.c
View file @
66820122
...
...
@@ -351,12 +351,10 @@ static void testCreateDeviceInterface(void)
}
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInterfaceA
(
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInterfaceA
(
NULL
,
NULL
,
&
guid
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
set
=
pSetupDiCreateDeviceInfoList
(
&
guid
,
NULL
);
...
...
@@ -369,13 +367,11 @@ static void testCreateDeviceInterface(void)
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInterfaceA
(
set
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInterfaceA
(
set
,
&
devInfo
,
NULL
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
devInfo
.
cbSize
=
sizeof
(
devInfo
);
...
...
@@ -385,7 +381,6 @@ static void testCreateDeviceInterface(void)
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInterfaceA
(
set
,
&
devInfo
,
NULL
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_USER_BUFFER
,
"Expected ERROR_INVALID_USER_BUFFER, got %08x
\n
"
,
GetLastError
());
ret
=
pSetupDiCreateDeviceInterfaceA
(
set
,
&
devInfo
,
&
guid
,
NULL
,
0
,
...
...
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