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
23be8593
Commit
23be8593
authored
May 20, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupDiEnumDriverInfo().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec02dde9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
22 deletions
+67
-22
devinst.c
dlls/setupapi/devinst.c
+67
-0
stubs.c
dlls/setupapi/stubs.c
+0
-22
No files found.
dlls/setupapi/devinst.c
View file @
23be8593
...
...
@@ -4258,3 +4258,70 @@ BOOL WINAPI SetupDiBuildDriverInfoList(HDEVINFO devinfo, SP_DEVINFO_DATA *device
return
TRUE
;
}
/***********************************************************************
* SetupDiEnumDriverInfoW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiEnumDriverInfoW
(
HDEVINFO
devinfo
,
SP_DEVINFO_DATA
*
device_data
,
DWORD
type
,
DWORD
index
,
SP_DRVINFO_DATA_W
*
driver_data
)
{
static
const
WCHAR
providerW
[]
=
{
'P'
,
'r'
,
'o'
,
'v'
,
'i'
,
'd'
,
'e'
,
'r'
,
0
};
struct
device
*
device
;
INFCONTEXT
ctx
;
HINF
hinf
;
TRACE
(
"devinfo %p, device_data %p, type %#x, index %u, driver_data %p.
\n
"
,
devinfo
,
device_data
,
type
,
index
,
driver_data
);
if
(
type
!=
SPDIT_COMPATDRIVER
)
{
FIXME
(
"Unhandled type %#x.
\n
"
,
type
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
if
(
!
(
device
=
get_device
(
devinfo
,
device_data
)))
return
FALSE
;
if
(
index
>=
device
->
driver_count
)
{
SetLastError
(
ERROR_NO_MORE_ITEMS
);
return
FALSE
;
}
if
((
hinf
=
SetupOpenInfFileW
(
device
->
drivers
[
index
].
inf_path
,
NULL
,
INF_STYLE_WIN4
,
NULL
))
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
driver_data
->
ProviderName
[
0
]
=
0
;
if
(
SetupFindFirstLineW
(
hinf
,
Version
,
providerW
,
&
ctx
))
SetupGetStringFieldW
(
&
ctx
,
1
,
driver_data
->
ProviderName
,
ARRAY_SIZE
(
driver_data
->
ProviderName
),
NULL
);
strcpyW
(
driver_data
->
Description
,
device
->
drivers
[
index
].
description
);
strcpyW
(
driver_data
->
MfgName
,
device
->
drivers
[
index
].
manufacturer
);
driver_data
->
DriverType
=
SPDIT_COMPATDRIVER
;
SetupCloseInfFile
(
hinf
);
return
TRUE
;
}
/***********************************************************************
* SetupDiEnumDriverInfoA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiEnumDriverInfoA
(
HDEVINFO
devinfo
,
SP_DEVINFO_DATA
*
device_data
,
DWORD
type
,
DWORD
index
,
SP_DRVINFO_DATA_A
*
driver_data
)
{
SP_DRVINFO_DATA_W
driver_dataW
;
BOOL
ret
;
driver_dataW
.
cbSize
=
sizeof
(
driver_dataW
);
ret
=
SetupDiEnumDriverInfoW
(
devinfo
,
device_data
,
type
,
index
,
&
driver_dataW
);
driver_data
->
DriverType
=
driver_dataW
.
DriverType
;
driver_data
->
Reserved
=
driver_dataW
.
Reserved
;
WideCharToMultiByte
(
CP_ACP
,
0
,
driver_dataW
.
Description
,
-
1
,
driver_data
->
Description
,
sizeof
(
driver_data
->
Description
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
driver_dataW
.
MfgName
,
-
1
,
driver_data
->
MfgName
,
sizeof
(
driver_data
->
MfgName
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
driver_dataW
.
ProviderName
,
-
1
,
driver_data
->
ProviderName
,
sizeof
(
driver_data
->
ProviderName
),
NULL
,
NULL
);
return
ret
;
}
dlls/setupapi/stubs.c
View file @
23be8593
...
...
@@ -642,28 +642,6 @@ BOOL WINAPI SetupDiSetSelectedDevice(HDEVINFO SetupDiSetSelectedDevice, PSP_DEVI
}
/***********************************************************************
* SetupDiEnumDriverInfoA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiEnumDriverInfoA
(
HDEVINFO
DeviceInfoSet
,
PSP_DEVINFO_DATA
DeviceInfoData
,
DWORD
DriverType
,
DWORD
MemberIndex
,
PSP_DRVINFO_DATA_A
DriverInfoData
)
{
FIXME
(
"(%p, %p, 0x%x, %u, %p stub
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
DriverType
,
MemberIndex
,
DriverInfoData
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* SetupDiEnumDriverInfoW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiEnumDriverInfoW
(
HDEVINFO
DeviceInfoSet
,
PSP_DEVINFO_DATA
DeviceInfoData
,
DWORD
DriverType
,
DWORD
MemberIndex
,
PSP_DRVINFO_DATA_W
DriverInfoData
)
{
FIXME
(
"(%p, %p, 0x%x, %u, %p stub
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
DriverType
,
MemberIndex
,
DriverInfoData
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* CM_Request_Device_EjectA (SETUPAPI.@)
*/
CONFIGRET
WINAPI
CM_Request_Device_EjectA
(
DEVINST
dev
,
PPNP_VETO_TYPE
type
,
LPSTR
name
,
ULONG
length
,
ULONG
flags
)
...
...
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