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
dc9c4221
Commit
dc9c4221
authored
May 24, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Add a basic implementation of SetupDiInstallDevice().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
89c1f511
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
2 deletions
+58
-2
devinst.c
dlls/setupapi/devinst.c
+57
-1
setupapi.spec
dlls/setupapi/setupapi.spec
+1
-1
No files found.
dlls/setupapi/devinst.c
View file @
dc9c4221
...
@@ -3684,8 +3684,9 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP
...
@@ -3684,8 +3684,9 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP
return
SetupDiInstallDriverFiles
(
devinfo
,
device_data
);
return
SetupDiInstallDriverFiles
(
devinfo
,
device_data
);
case
DIF_INSTALLINTERFACES
:
case
DIF_INSTALLINTERFACES
:
return
SetupDiInstallDeviceInterfaces
(
devinfo
,
device_data
);
return
SetupDiInstallDeviceInterfaces
(
devinfo
,
device_data
);
case
DIF_FINISHINSTALL_ACTION
:
case
DIF_INSTALLDEVICE
:
case
DIF_INSTALLDEVICE
:
return
SetupDiInstallDevice
(
devinfo
,
device_data
);
case
DIF_FINISHINSTALL_ACTION
:
case
DIF_PROPERTYCHANGE
:
case
DIF_PROPERTYCHANGE
:
case
DIF_SELECTDEVICE
:
case
DIF_SELECTDEVICE
:
case
DIF_UNREMOVE
:
case
DIF_UNREMOVE
:
...
@@ -4677,3 +4678,58 @@ BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_
...
@@ -4677,3 +4678,58 @@ BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_
SetupCloseInfFile
(
hinf
);
SetupCloseInfFile
(
hinf
);
return
TRUE
;
return
TRUE
;
}
}
/***********************************************************************
* SetupDiInstallDevice (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiInstallDevice
(
HDEVINFO
devinfo
,
SP_DEVINFO_DATA
*
device_data
)
{
WCHAR
section
[
LINE_LEN
],
section_ext
[
LINE_LEN
];
UINT
install_flags
=
SPINST_ALL
;
struct
device
*
device
;
struct
driver
*
driver
;
void
*
callback_ctx
;
HKEY
driver_key
;
INFCONTEXT
ctx
;
HINF
hinf
;
LONG
l
;
TRACE
(
"devinfo %p, device_data %p.
\n
"
,
devinfo
,
device_data
);
if
(
!
(
device
=
get_device
(
devinfo
,
device_data
)))
return
FALSE
;
if
(
!
(
driver
=
device
->
selected_driver
))
{
ERR
(
"No driver selected for device %p.
\n
"
,
devinfo
);
SetLastError
(
ERROR_NO_DRIVER_SELECTED
);
return
FALSE
;
}
if
((
hinf
=
SetupOpenInfFileW
(
driver
->
inf_path
,
NULL
,
INF_STYLE_WIN4
,
NULL
))
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
SetupFindFirstLineW
(
hinf
,
driver
->
mfg_key
,
driver
->
description
,
&
ctx
);
SetupGetStringFieldW
(
&
ctx
,
1
,
section
,
ARRAY_SIZE
(
section
),
NULL
);
SetupDiGetActualSectionToInstallW
(
hinf
,
section
,
section_ext
,
ARRAY_SIZE
(
section_ext
),
NULL
,
NULL
);
if
((
l
=
create_driver_key
(
device
,
&
driver_key
)))
{
SetLastError
(
l
);
SetupCloseInfFile
(
hinf
);
return
FALSE
;
}
if
(
device
->
params
.
Flags
&
DI_NOFILECOPY
)
install_flags
&=
~
SPINST_FILES
;
callback_ctx
=
SetupInitDefaultQueueCallback
(
NULL
);
SetupInstallFromInfSectionW
(
NULL
,
hinf
,
section_ext
,
install_flags
,
driver_key
,
NULL
,
SP_COPY_NEWER_ONLY
,
SetupDefaultQueueCallbackW
,
callback_ctx
,
NULL
,
NULL
);
SetupTermDefaultQueueCallback
(
callback_ctx
);
SetupCloseInfFile
(
hinf
);
RegCloseKey
(
driver_key
);
return
TRUE
;
}
dlls/setupapi/setupapi.spec
View file @
dc9c4221
...
@@ -366,7 +366,7 @@
...
@@ -366,7 +366,7 @@
@ stub SetupDiInstallClassExA
@ stub SetupDiInstallClassExA
@ stub SetupDiInstallClassExW
@ stub SetupDiInstallClassExW
@ stdcall SetupDiInstallClassW(long wstr long ptr)
@ stdcall SetupDiInstallClassW(long wstr long ptr)
@ st
ub SetupDiInstallDevice
@ st
dcall SetupDiInstallDevice(ptr ptr)
@ stdcall SetupDiInstallDeviceInterfaces(ptr ptr)
@ stdcall SetupDiInstallDeviceInterfaces(ptr ptr)
@ stdcall SetupDiInstallDriverFiles(ptr ptr)
@ stdcall SetupDiInstallDriverFiles(ptr ptr)
@ stdcall SetupDiLoadClassIcon(ptr ptr ptr)
@ stdcall SetupDiLoadClassIcon(ptr ptr ptr)
...
...
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