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
698ee36c
Commit
698ee36c
authored
Apr 11, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Apr 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Perform a setupapi-level install of the INF file in RunSetupCommand.
parent
46fe9448
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
install.c
dlls/advpack/install.c
+38
-1
No files found.
dlls/advpack/install.c
View file @
698ee36c
...
...
@@ -74,6 +74,40 @@ static BOOL is_full_path(LPWSTR path)
return
FALSE
;
}
/* performs a setupapi-level install of the INF file */
static
HRESULT
spapi_install
(
HINF
hinf
,
LPCWSTR
install_sec
,
LPCWSTR
source_path
)
{
BOOL
ret
;
HRESULT
res
;
PVOID
context
;
context
=
SetupInitDefaultQueueCallbackEx
(
NULL
,
INVALID_HANDLE_VALUE
,
0
,
0
,
NULL
);
if
(
!
context
)
return
ADV_HRESULT
(
GetLastError
());
ret
=
SetupInstallFromInfSectionW
(
NULL
,
hinf
,
install_sec
,
SPINST_FILES
,
NULL
,
source_path
,
SP_COPY_NEWER
,
NULL
,
context
,
NULL
,
NULL
);
if
(
!
ret
)
{
res
=
ADV_HRESULT
(
GetLastError
());
SetupTermDefaultQueueCallback
(
context
);
return
res
;
}
SetupTermDefaultQueueCallback
(
context
);
ret
=
SetupInstallFromInfSectionW
(
NULL
,
hinf
,
install_sec
,
SPINST_INIFILES
|
SPINST_REGISTRY
,
HKEY_LOCAL_MACHINE
,
NULL
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
ret
)
return
ADV_HRESULT
(
GetLastError
());
return
S_OK
;
}
/* this structure very closely resembles parameters of RunSetupCommand() */
typedef
struct
{
...
...
@@ -438,6 +472,7 @@ HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName,
DWORD
dwFlags
,
LPVOID
pvReserved
)
{
HINF
hinf
;
HRESULT
hr
;
TRACE
(
"(%p, %s, %s, %s, %s, %p, %ld, %p)
\n
"
,
hWnd
,
debugstr_w
(
szCmdName
),
debugstr_w
(
szInfSection
),
...
...
@@ -457,6 +492,8 @@ HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName,
if
(
hinf
==
INVALID_HANDLE_VALUE
)
return
ADV_HRESULT
(
GetLastError
());
hr
=
spapi_install
(
hinf
,
szInfSection
,
szDir
);
SetupCloseInfFile
(
hinf
);
return
E_UNEXPECTED
;
return
hr
;
}
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